<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Why are metrics producing the wrong value for host field? in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Why-are-metrics-producing-the-wrong-value-for-host-field/m-p/394328#M70390</link>
    <description>&lt;P&gt;Thank you aromanauskas for your answer&lt;BR /&gt;
But if the host is the Splunk Server doing the conversion to metrics, How can the host be 127.0.0.1? which is the value I set $server in my TCPConnection.&lt;/P&gt;</description>
    <pubDate>Thu, 30 May 2019 08:23:10 GMT</pubDate>
    <dc:creator>diogoribeirosky</dc:creator>
    <dc:date>2019-05-30T08:23:10Z</dc:date>
    <item>
      <title>Why are metrics producing the wrong value for host field?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Why-are-metrics-producing-the-wrong-value-for-host-field/m-p/394323#M70385</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;

&lt;P&gt;I deployed a Splunk APP that listens to TCP in port 7001, protocol starts with the following code:&lt;/P&gt;

&lt;P&gt;inputs.conf:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;tcp:7001]
index = metrics
sourcetype = statsd
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;And I have in \splunk-forwarder\etc\system\local\inputs.conf the following definition:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[default]
host = myhostname
index = prod
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;The index value is correctly overwritten. &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;

&lt;P&gt;The problem happens when I am searching for mstats, the value for the host is 127.0.0.1,&lt;BR /&gt;
which is the IP where I am sending my metrics with powershell.&lt;BR /&gt;
I can't understand why the value host = myhostname is overwritten, I have no definition of this field in the Splunk APP deployed.&lt;/P&gt;

&lt;P&gt;Can someone help me?&lt;/P&gt;</description>
      <pubDate>Wed, 29 May 2019 16:25:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Why-are-metrics-producing-the-wrong-value-for-host-field/m-p/394323#M70385</guid>
      <dc:creator>diogoribeirosky</dc:creator>
      <dc:date>2019-05-29T16:25:30Z</dc:date>
    </item>
    <item>
      <title>Re: Why are metrics producing the wrong value for host field?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Why-are-metrics-producing-the-wrong-value-for-host-field/m-p/394324#M70386</link>
      <description>&lt;P&gt;Btool may help.  Run &lt;CODE&gt;splunk btool --debug inputs list | Select-string -Pattern "host"  &amp;lt;filepattern&amp;gt; -Simplematch&lt;/CODE&gt; in powershell to see where the host is getting set.&lt;/P&gt;</description>
      <pubDate>Wed, 29 May 2019 19:47:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Why-are-metrics-producing-the-wrong-value-for-host-field/m-p/394324#M70386</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2019-05-29T19:47:17Z</dc:date>
    </item>
    <item>
      <title>Re: Why are metrics producing the wrong value for host field?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Why-are-metrics-producing-the-wrong-value-for-host-field/m-p/394325#M70387</link>
      <description>&lt;P&gt;After running, I receive this message&lt;BR /&gt;
&lt;CODE&gt;&lt;BR /&gt;
\splunk-forwarder\etc\system\local\inputs.conf host = myhostname&lt;BR /&gt;
&lt;/CODE&gt;&lt;BR /&gt;
and in search app splunk host is still 127.0.0.1&lt;/P&gt;</description>
      <pubDate>Wed, 29 May 2019 20:40:57 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Why-are-metrics-producing-the-wrong-value-for-host-field/m-p/394325#M70387</guid>
      <dc:creator>diogoribeirosky</dc:creator>
      <dc:date>2019-05-29T20:40:57Z</dc:date>
    </item>
    <item>
      <title>Re: Why are metrics producing the wrong value for host field?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Why-are-metrics-producing-the-wrong-value-for-host-field/m-p/394326#M70388</link>
      <description>&lt;PRE&gt;&lt;CODE&gt;[tcp]
_rcvbuf = 1572864
acceptFrom = *
connection_host = dns
evt_dc_name =
evt_dns_name =
evt_resolve_ad_obj = 0
host = myhostname
index = prod
[tcp:7051]
_rcvbuf = 1572864
acceptFrom = 127.0.0.1
evt_dc_name =
evt_dns_name =
evt_resolve_ad_obj = 0
host = myhostname
index = metrics
listenOnIPv6 = no
sourcetype = statsd
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;When running, &lt;CODE&gt;./splunk cmd btool inputs list&lt;/CODE&gt; command&lt;/P&gt;</description>
      <pubDate>Wed, 29 May 2019 20:54:12 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Why-are-metrics-producing-the-wrong-value-for-host-field/m-p/394326#M70388</guid>
      <dc:creator>diogoribeirosky</dc:creator>
      <dc:date>2019-05-29T20:54:12Z</dc:date>
    </item>
    <item>
      <title>Re: Why are metrics producing the wrong value for host field?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Why-are-metrics-producing-the-wrong-value-for-host-field/m-p/394327#M70389</link>
      <description>&lt;P&gt;Since this is an input to a metric index the host is the Splunk Server doing the conversion to metrics. There instead will be a different recalculated field for the original host. This is similar to the host of a summary index. Simplest option is to use Hostname instead as the dimension. &lt;/P&gt;</description>
      <pubDate>Thu, 30 May 2019 03:48:12 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Why-are-metrics-producing-the-wrong-value-for-host-field/m-p/394327#M70389</guid>
      <dc:creator>aromanauskas</dc:creator>
      <dc:date>2019-05-30T03:48:12Z</dc:date>
    </item>
    <item>
      <title>Re: Why are metrics producing the wrong value for host field?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Why-are-metrics-producing-the-wrong-value-for-host-field/m-p/394328#M70390</link>
      <description>&lt;P&gt;Thank you aromanauskas for your answer&lt;BR /&gt;
But if the host is the Splunk Server doing the conversion to metrics, How can the host be 127.0.0.1? which is the value I set $server in my TCPConnection.&lt;/P&gt;</description>
      <pubDate>Thu, 30 May 2019 08:23:10 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Why-are-metrics-producing-the-wrong-value-for-host-field/m-p/394328#M70390</guid>
      <dc:creator>diogoribeirosky</dc:creator>
      <dc:date>2019-05-30T08:23:10Z</dc:date>
    </item>
    <item>
      <title>Re: Why are metrics producing the wrong value for host field?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Why-are-metrics-producing-the-wrong-value-for-host-field/m-p/394329#M70391</link>
      <description>&lt;P&gt;That is because the splunk server is using the rest API to communicate to itself on 127.0.0.1 . If you were using mcollect to write to the metric index, then it would replace the host with the name of the search head running the report. To keep confusion to a minimum I find it best to stay away from using host AND sourcetype for anything in metric indexes. &lt;/P&gt;</description>
      <pubDate>Thu, 30 May 2019 13:55:58 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Why-are-metrics-producing-the-wrong-value-for-host-field/m-p/394329#M70391</guid>
      <dc:creator>aromanauskas</dc:creator>
      <dc:date>2019-05-30T13:55:58Z</dc:date>
    </item>
    <item>
      <title>Re: Why are metrics producing the wrong value for host field?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Why-are-metrics-producing-the-wrong-value-for-host-field/m-p/394330#M70392</link>
      <description>&lt;P&gt;Hi @diogoribeirosky  ,&lt;/P&gt;

&lt;P&gt;Did you have a chance to check out any answers? If any work, please resolve this post by approving it! If your problem is still not solved, keep us updated so that someone else can help you. &lt;/P&gt;

&lt;P&gt;Thanks for posting!&lt;/P&gt;</description>
      <pubDate>Thu, 06 Jun 2019 18:04:41 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Why-are-metrics-producing-the-wrong-value-for-host-field/m-p/394330#M70392</guid>
      <dc:creator>evania</dc:creator>
      <dc:date>2019-06-06T18:04:41Z</dc:date>
    </item>
    <item>
      <title>Re: Why are metrics producing the wrong value for host field?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Why-are-metrics-producing-the-wrong-value-for-host-field/m-p/394331#M70393</link>
      <description>&lt;P&gt;Hi @evzhang_splunk ,&lt;BR /&gt;
Yes. I checked all the answers but unfortunately the problem is not solved. I think this might be a Splunk bug or malfunctioning....I used the statsd dimensions to pass the hostname info, which is redundant if the host is set correctly.&lt;/P&gt;</description>
      <pubDate>Fri, 07 Jun 2019 08:39:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Why-are-metrics-producing-the-wrong-value-for-host-field/m-p/394331#M70393</guid>
      <dc:creator>diogoribeirosky</dc:creator>
      <dc:date>2019-06-07T08:39:42Z</dc:date>
    </item>
  </channel>
</rss>

