<?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: How to override host metadata? in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/How-to-override-host-metadata/m-p/273674#M52499</link>
    <description>&lt;P&gt;Hi jmonreal,&lt;/P&gt;

&lt;P&gt;There are a few things here:&lt;BR /&gt;
Please do not make your configuration changes in /default. There is a good chance that if you upgrade, your configurations will be overwritten.&lt;/P&gt;

&lt;P&gt;Have you looked at using the "host" directive rather than using _meta?&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[udp://44444]
disabled        = false
index   = main
source  = docker
sourcetype   = docker
host = registrydocker.localdomain.com
_TCP_ROUTING    = test
_meta   =  site::"sao" environment::"_default" pool::"registrydocker" domain::"localdomain.com" cloud::"true"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;You can also add the "host" directive to your inputs.conf:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[tcpout:test]
 server = 192.168.1.101:9997,192.168.1.100:9997
 disabled = false
 host = registrydocker.localdomain.com
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;If you are not seeing any of your _meta fields, you may also need to check your fields.conf.&lt;/P&gt;</description>
    <pubDate>Thu, 15 Oct 2015 15:44:38 GMT</pubDate>
    <dc:creator>dshpritz</dc:creator>
    <dc:date>2015-10-15T15:44:38Z</dc:date>
    <item>
      <title>How to override host metadata?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-override-host-metadata/m-p/273673#M52498</link>
      <description>&lt;P&gt;Good day everyone!&lt;/P&gt;

&lt;P&gt;I have my Splunk cluster separated in Forwarders (inside each application server), Indexer (a set of servers running only Splunk as indexer) and Search Heads (a set of servers running only Splunk as search head).&lt;/P&gt;

&lt;P&gt;I have on each application server a rsyslog that is sending logs to a certain $PORT which is also configured in the Splunk Forwarder as follows:&lt;/P&gt;

&lt;P&gt;Inside the directory &lt;CODE&gt;$SPLUNK_HOME/etc/apps/search/default/&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;inputs.conf&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[udp://44444]
disabled        = false
_TCP_ROUTING    = test
index   = main
source  = docker
sourcetype      = docker
_meta   = host::"registrydocker.localdomain.com" site::"sao" environment::"_default" pool::"registrydocker" domain::"localdomain.com" cloud::"true"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;outputs.conf&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[tcpout:test]
server = 192.168.1.101:9997,192.168.1.100:9997
disabled = false
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Now the indexer has no special configuration.&lt;/P&gt;

&lt;P&gt;When I look at the logs in Splunk, the host shows 127.0.0.1 instead of registrydocker.localdomain.com&lt;BR /&gt;
How should I be overriding the host and other metadata? Is it possible to override host and sourcetype for the same log lines?&lt;/P&gt;</description>
      <pubDate>Thu, 15 Oct 2015 14:49:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-override-host-metadata/m-p/273673#M52498</guid>
      <dc:creator>jmonreal</dc:creator>
      <dc:date>2015-10-15T14:49:37Z</dc:date>
    </item>
    <item>
      <title>Re: How to override host metadata?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-override-host-metadata/m-p/273674#M52499</link>
      <description>&lt;P&gt;Hi jmonreal,&lt;/P&gt;

&lt;P&gt;There are a few things here:&lt;BR /&gt;
Please do not make your configuration changes in /default. There is a good chance that if you upgrade, your configurations will be overwritten.&lt;/P&gt;

&lt;P&gt;Have you looked at using the "host" directive rather than using _meta?&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[udp://44444]
disabled        = false
index   = main
source  = docker
sourcetype   = docker
host = registrydocker.localdomain.com
_TCP_ROUTING    = test
_meta   =  site::"sao" environment::"_default" pool::"registrydocker" domain::"localdomain.com" cloud::"true"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;You can also add the "host" directive to your inputs.conf:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[tcpout:test]
 server = 192.168.1.101:9997,192.168.1.100:9997
 disabled = false
 host = registrydocker.localdomain.com
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;If you are not seeing any of your _meta fields, you may also need to check your fields.conf.&lt;/P&gt;</description>
      <pubDate>Thu, 15 Oct 2015 15:44:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-override-host-metadata/m-p/273674#M52499</guid>
      <dc:creator>dshpritz</dc:creator>
      <dc:date>2015-10-15T15:44:38Z</dc:date>
    </item>
    <item>
      <title>Re: How to override host metadata?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-override-host-metadata/m-p/273675#M52500</link>
      <description>&lt;P&gt;Worked over IRC, turns out the issue was that the inputs.conf needed:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;connection_host = none
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;On the [udp://] stanza.&lt;/P&gt;</description>
      <pubDate>Thu, 15 Oct 2015 19:18:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-override-host-metadata/m-p/273675#M52500</guid>
      <dc:creator>dshpritz</dc:creator>
      <dc:date>2015-10-15T19:18:44Z</dc:date>
    </item>
    <item>
      <title>Re: How to override host metadata?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-override-host-metadata/m-p/273676#M52501</link>
      <description>&lt;P&gt;This one worked! Thanks &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 19 Oct 2015 19:47:52 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-override-host-metadata/m-p/273676#M52501</guid>
      <dc:creator>jmonreal</dc:creator>
      <dc:date>2015-10-19T19:47:52Z</dc:date>
    </item>
  </channel>
</rss>

