<?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: ip address and hostname from fowarder in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/ip-address-and-hostname-from-fowarder/m-p/34222#M6183</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;Well for option one, you would add an extra piece of info to the &lt;CODE&gt;source&lt;/CODE&gt;, namely the physical host, by having that in the path to the log file directory. No information lost.&lt;/P&gt;

&lt;P&gt;For option two, you would still not lose info. The physical host would be found in the &lt;CODE&gt;host&lt;/CODE&gt; and the logical node in the &lt;CODE&gt;source&lt;/CODE&gt; for each event. &lt;/P&gt;

&lt;P&gt;Option three is just a refined version of option two.&lt;/P&gt;</description>
    <pubDate>Fri, 16 Aug 2013 22:12:57 GMT</pubDate>
    <dc:creator>kristian_kolb</dc:creator>
    <dc:date>2013-08-16T22:12:57Z</dc:date>
    <item>
      <title>ip address and hostname from fowarder</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/ip-address-and-hostname-from-fowarder/m-p/34217#M6178</link>
      <description>&lt;P&gt;I am using a host segment to set a 'hostname' (we have multiple hosts on one box) as set out below:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[monitor://c:\logs\node-21\*.log]
host_segment = 2
index = node_logs
sourcetype = node_logs
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I would like to see my other 'hostname' and the ip address.  The reason being I may need to move these 'hosts' between machines so it would be good to know the ip address they came from.&lt;/P&gt;

&lt;P&gt;Has anyone got this kind of setup or have any good ideas?&lt;/P&gt;

&lt;P&gt;Regards&lt;BR /&gt;
Andy&lt;/P&gt;</description>
      <pubDate>Wed, 14 Aug 2013 08:52:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/ip-address-and-hostname-from-fowarder/m-p/34217#M6178</guid>
      <dc:creator>andykiely</dc:creator>
      <dc:date>2013-08-14T08:52:29Z</dc:date>
    </item>
    <item>
      <title>Re: ip address and hostname from fowarder</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/ip-address-and-hostname-from-fowarder/m-p/34218#M6179</link>
      <description>&lt;P&gt;Hm.. not sure I fully understand. With your current configuration the &lt;CODE&gt;host&lt;/CODE&gt; field will be set to 'node-21' at all times. Is that really what you want?&lt;/P&gt;

&lt;P&gt;By "other hostname", do you mean the physical box where the logs are stored?&lt;/P&gt;</description>
      <pubDate>Wed, 14 Aug 2013 10:44:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/ip-address-and-hostname-from-fowarder/m-p/34218#M6179</guid>
      <dc:creator>kristian_kolb</dc:creator>
      <dc:date>2013-08-14T10:44:34Z</dc:date>
    </item>
    <item>
      <title>Re: ip address and hostname from fowarder</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/ip-address-and-hostname-from-fowarder/m-p/34219#M6180</link>
      <description>&lt;P&gt;Hi kristian,&lt;/P&gt;

&lt;P&gt;I want to see node-21 or node-23 or whatever happens to be in the directory portion as the 'hostname', I do not really care about the physical hostname of the server.  I would like to see the ip addresses of the host server as these nodes may need to be moved to a different server at times and I would like a way of tracking which server the nodes were on at any one time.&lt;/P&gt;

&lt;P&gt;Hope that makes sense.&lt;/P&gt;</description>
      <pubDate>Wed, 14 Aug 2013 13:40:11 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/ip-address-and-hostname-from-fowarder/m-p/34219#M6180</guid>
      <dc:creator>andykiely</dc:creator>
      <dc:date>2013-08-14T13:40:11Z</dc:date>
    </item>
    <item>
      <title>Re: ip address and hostname from fowarder</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/ip-address-and-hostname-from-fowarder/m-p/34220#M6181</link>
      <description>&lt;P&gt;You are only monitoring the 'node-21' directory for log files, thus, &lt;CODE&gt;host_segment=2&lt;/CODE&gt; will always be 'node-21'. Wildcards can be used to monitor more directories. See below.&lt;/P&gt;

&lt;P&gt;Do you by 'ip-address of the host server' mean the physical machine where the nodes are running, and where the log file directories are created/stored. If so, perhaps the easiest way would be to change the logging directory, so that this piece of information gets stored in the &lt;CODE&gt;source&lt;/CODE&gt; field, i.e. &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[monitor://c:\logs\server_a\node*\*.log]
host_segment=3
index=node_logs
sourcetype=node_logs
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;The &lt;CODE&gt;source&lt;/CODE&gt; field is present in all events, and can then be used to see from where an event originated.&lt;/P&gt;

&lt;P&gt;OR&lt;/P&gt;

&lt;P&gt;You could do the opposite - remove the &lt;CODE&gt;host_segment&lt;/CODE&gt; configuration, so that all events will have the &lt;CODE&gt;host&lt;/CODE&gt; value set to the physical machine. Then you can use the &lt;CODE&gt;source&lt;/CODE&gt; field to find out which node an event came from.&lt;/P&gt;

&lt;P&gt;OR&lt;/P&gt;

&lt;P&gt;you can just set the value of &lt;CODE&gt;source&lt;/CODE&gt; in inputs.conf to any string you like, even though the general recommendation is to let it be.&lt;/P&gt;

&lt;P&gt;For more information, see;&lt;/P&gt;

&lt;P&gt;&lt;A href="http://docs.splunk.com/Documentation/Splunk/latest/Admin/Inputsconf"&gt;http://docs.splunk.com/Documentation/Splunk/latest/Admin/Inputsconf&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;/K&lt;/P&gt;</description>
      <pubDate>Wed, 14 Aug 2013 14:41:55 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/ip-address-and-hostname-from-fowarder/m-p/34220#M6181</guid>
      <dc:creator>kristian_kolb</dc:creator>
      <dc:date>2013-08-14T14:41:55Z</dc:date>
    </item>
    <item>
      <title>Re: ip address and hostname from fowarder</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/ip-address-and-hostname-from-fowarder/m-p/34221#M6182</link>
      <description>&lt;P&gt;Hi Kristian,&lt;/P&gt;

&lt;P&gt;No the directory is changing (see last response) this is why I used the host_segment.  I would like to add the ip address of the physical host server to the events, ideally I don't want to change the source as the filenames contain useful information.&lt;/P&gt;

&lt;P&gt;Regards&lt;BR /&gt;
Andy&lt;/P&gt;</description>
      <pubDate>Wed, 14 Aug 2013 14:50:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/ip-address-and-hostname-from-fowarder/m-p/34221#M6182</guid>
      <dc:creator>andykiely</dc:creator>
      <dc:date>2013-08-14T14:50:42Z</dc:date>
    </item>
    <item>
      <title>Re: ip address and hostname from fowarder</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/ip-address-and-hostname-from-fowarder/m-p/34222#M6183</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;Well for option one, you would add an extra piece of info to the &lt;CODE&gt;source&lt;/CODE&gt;, namely the physical host, by having that in the path to the log file directory. No information lost.&lt;/P&gt;

&lt;P&gt;For option two, you would still not lose info. The physical host would be found in the &lt;CODE&gt;host&lt;/CODE&gt; and the logical node in the &lt;CODE&gt;source&lt;/CODE&gt; for each event. &lt;/P&gt;

&lt;P&gt;Option three is just a refined version of option two.&lt;/P&gt;</description>
      <pubDate>Fri, 16 Aug 2013 22:12:57 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/ip-address-and-hostname-from-fowarder/m-p/34222#M6183</guid>
      <dc:creator>kristian_kolb</dc:creator>
      <dc:date>2013-08-16T22:12:57Z</dc:date>
    </item>
    <item>
      <title>Re: ip address and hostname from fowarder</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/ip-address-and-hostname-from-fowarder/m-p/34223#M6184</link>
      <description>&lt;P&gt;Hi Kristian,&lt;/P&gt;

&lt;P&gt;I went with the source option in the end.  I removed the host_segment config from the UF and then did an extract within PROPS.conf to create an extra field called 'node'.&lt;/P&gt;

&lt;P&gt;Thanks for your input, really helpful.&lt;/P&gt;

&lt;P&gt;Regards&lt;BR /&gt;
Andy&lt;/P&gt;</description>
      <pubDate>Mon, 18 Nov 2013 17:01:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/ip-address-and-hostname-from-fowarder/m-p/34223#M6184</guid>
      <dc:creator>andykiely</dc:creator>
      <dc:date>2013-11-18T17:01:05Z</dc:date>
    </item>
  </channel>
</rss>

