<?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 Keeping Host data when using Heavy Forwarder in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Keeping-Host-data-when-using-Heavy-Forwarder/m-p/232327#M45303</link>
    <description>&lt;P&gt;We have recently moved from having an internal hosted Splunk setup to Splunk Cloud.  Before the move to the Cloud all of our logs sent to syslog-ng kept the correct host information.  Now though we have lost this and only see the syslog server as the host.  All of the syslog-ng settings are the same, but the change is that we have added a Heavy Forwarder to act as a central spot to send all logs through. &lt;/P&gt;

&lt;P&gt;We really would like to keep the original host information if we could.  Is this possible with this setup and if so, what config needs to change on the Heavy Forwarder?  &lt;/P&gt;

&lt;P&gt;Thanks  &lt;/P&gt;</description>
    <pubDate>Wed, 18 Jan 2017 15:23:01 GMT</pubDate>
    <dc:creator>tegnatomm</dc:creator>
    <dc:date>2017-01-18T15:23:01Z</dc:date>
    <item>
      <title>Keeping Host data when using Heavy Forwarder</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Keeping-Host-data-when-using-Heavy-Forwarder/m-p/232327#M45303</link>
      <description>&lt;P&gt;We have recently moved from having an internal hosted Splunk setup to Splunk Cloud.  Before the move to the Cloud all of our logs sent to syslog-ng kept the correct host information.  Now though we have lost this and only see the syslog server as the host.  All of the syslog-ng settings are the same, but the change is that we have added a Heavy Forwarder to act as a central spot to send all logs through. &lt;/P&gt;

&lt;P&gt;We really would like to keep the original host information if we could.  Is this possible with this setup and if so, what config needs to change on the Heavy Forwarder?  &lt;/P&gt;

&lt;P&gt;Thanks  &lt;/P&gt;</description>
      <pubDate>Wed, 18 Jan 2017 15:23:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Keeping-Host-data-when-using-Heavy-Forwarder/m-p/232327#M45303</guid>
      <dc:creator>tegnatomm</dc:creator>
      <dc:date>2017-01-18T15:23:01Z</dc:date>
    </item>
    <item>
      <title>Re: Keeping Host data when using Heavy Forwarder</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Keeping-Host-data-when-using-Heavy-Forwarder/m-p/232328#M45304</link>
      <description>&lt;P&gt;Hi tegnatomm, &lt;/P&gt;

&lt;P&gt;If your logs are stored on a different server than its origin, you can override the default host value using these methods:&lt;BR /&gt;
- Explicitly set the host&lt;BR /&gt;
CLI command: &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;splunk edit default-hostname &amp;lt;new_hostname&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;UL&gt;
&lt;LI&gt;&lt;P&gt;Set the host based on a directory name. &lt;BR /&gt;
inputs.conf: &lt;/P&gt;

&lt;P&gt;[monitor://C:\var\logs]&lt;BR /&gt;
host_segment=3&lt;/P&gt;&lt;/LI&gt;
&lt;/UL&gt;

&lt;P&gt;Setting host_segment to 3 uses the 3rd segment of the directory path as the host name for files in that directory. &lt;BR /&gt;
- Set the host based on a regular expression. &lt;BR /&gt;
inputs.conf&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[monitor://C:\var\logs\]
host_regex=(vmail.+)\.log$
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Setting host_regex to (vmail.+).log$ selects the second part of the log file name as its host name (e.g., iis_vmail1.log, iis_vmail2.log, ...). &lt;/P&gt;

&lt;P&gt;Hope this helps. Thanks!&lt;BR /&gt;
Hunter&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 12:24:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Keeping-Host-data-when-using-Heavy-Forwarder/m-p/232328#M45304</guid>
      <dc:creator>hunters_splunk</dc:creator>
      <dc:date>2020-09-29T12:24:39Z</dc:date>
    </item>
  </channel>
</rss>

