<?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: Cannot change host field in syslog data in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Cannot-change-host-field-in-syslog-data/m-p/199593#M39498</link>
    <description>&lt;P&gt;The problem is that while &lt;CODE&gt;host=myhost&lt;/CODE&gt; is set in the input phase, data with the &lt;CODE&gt;syslog&lt;/CODE&gt; sourcetype will be sent to a transform that rewrites the hostname to whatever comes after the timestamp in &lt;EM&gt;each event&lt;/EM&gt;. &lt;/P&gt;

&lt;P&gt;If you change the sourcetype to something other than &lt;CODE&gt;syslog&lt;/CODE&gt; this host override will not happen.&lt;/P&gt;

&lt;P&gt;/k&lt;/P&gt;</description>
    <pubDate>Wed, 03 Sep 2014 07:54:00 GMT</pubDate>
    <dc:creator>kristian_kolb</dc:creator>
    <dc:date>2014-09-03T07:54:00Z</dc:date>
    <item>
      <title>Cannot change host field in syslog data</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Cannot-change-host-field-in-syslog-data/m-p/199590#M39495</link>
      <description>&lt;P&gt;Hi Splunkers,&lt;/P&gt;

&lt;P&gt;I collect syslog（/var/log/messages） data by Universal Forwarder, not UDP like this.&lt;BR /&gt;
    Sep  3 12:42:16 ip-111-111-111-111 dhclient: bound to 111.111.111.111 -- renewal in 1414 seconds.&lt;/P&gt;

&lt;P&gt;And I want to get this host field as FQDN "myhost", but I cannot do this.&lt;BR /&gt;
Configuration files in indexers as following.&lt;/P&gt;

&lt;P&gt;inputs.conf&lt;BR /&gt;
    [monitor:///var/log/messages]&lt;BR /&gt;
    index = mysyslog&lt;BR /&gt;
    host =  myhost&lt;/P&gt;

&lt;P&gt;props.conf&lt;BR /&gt;
    [host::ip-111-111-111-111]&lt;BR /&gt;
    TRANSFORMS-t1 = rename_myhost&lt;/P&gt;

&lt;P&gt;transforms.conf&lt;BR /&gt;
    [rename_myhost]&lt;BR /&gt;
    REGEX = ^.*$&lt;BR /&gt;
    DEST_KEY = MetaData:Host&lt;BR /&gt;
    FORMAT = host::myhost&lt;/P&gt;

&lt;P&gt;How can I will do this ?&lt;/P&gt;

&lt;P&gt;Thank you for your help.&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 17:28:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Cannot-change-host-field-in-syslog-data/m-p/199590#M39495</guid>
      <dc:creator>sunrise</dc:creator>
      <dc:date>2020-09-28T17:28:04Z</dc:date>
    </item>
    <item>
      <title>Re: Cannot change host field in syslog data</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Cannot-change-host-field-in-syslog-data/m-p/199591#M39496</link>
      <description>&lt;P&gt;inputs.confでhostを指定するのではダメですか？&lt;/P&gt;

&lt;P&gt;例）&lt;BR /&gt;
[monitor:///var/log/messages]&lt;BR /&gt;
disabled = false&lt;BR /&gt;
sourcetype = syslog&lt;BR /&gt;
host = myhost&lt;/P&gt;</description>
      <pubDate>Wed, 03 Sep 2014 04:58:36 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Cannot-change-host-field-in-syslog-data/m-p/199591#M39496</guid>
      <dc:creator>HiroshiSatoh</dc:creator>
      <dc:date>2014-09-03T04:58:36Z</dc:date>
    </item>
    <item>
      <title>Re: Cannot change host field in syslog data</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Cannot-change-host-field-in-syslog-data/m-p/199592#M39497</link>
      <description>&lt;P&gt;No I cannot do by that way.&lt;BR /&gt;
I've already set host=myhost in inputs.conf file.&lt;/P&gt;</description>
      <pubDate>Wed, 03 Sep 2014 07:09:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Cannot-change-host-field-in-syslog-data/m-p/199592#M39497</guid>
      <dc:creator>sunrise</dc:creator>
      <dc:date>2014-09-03T07:09:29Z</dc:date>
    </item>
    <item>
      <title>Re: Cannot change host field in syslog data</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Cannot-change-host-field-in-syslog-data/m-p/199593#M39498</link>
      <description>&lt;P&gt;The problem is that while &lt;CODE&gt;host=myhost&lt;/CODE&gt; is set in the input phase, data with the &lt;CODE&gt;syslog&lt;/CODE&gt; sourcetype will be sent to a transform that rewrites the hostname to whatever comes after the timestamp in &lt;EM&gt;each event&lt;/EM&gt;. &lt;/P&gt;

&lt;P&gt;If you change the sourcetype to something other than &lt;CODE&gt;syslog&lt;/CODE&gt; this host override will not happen.&lt;/P&gt;

&lt;P&gt;/k&lt;/P&gt;</description>
      <pubDate>Wed, 03 Sep 2014 07:54:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Cannot-change-host-field-in-syslog-data/m-p/199593#M39498</guid>
      <dc:creator>kristian_kolb</dc:creator>
      <dc:date>2014-09-03T07:54:00Z</dc:date>
    </item>
    <item>
      <title>Re: Cannot change host field in syslog data</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Cannot-change-host-field-in-syslog-data/m-p/199594#M39499</link>
      <description>&lt;P&gt;@sunrise, @HiroshiSatoh @kristian.kolb  Still it is unclear to me what would be correct settings in inputs, props and transforms.conf&lt;/P&gt;

&lt;P&gt;is this correct ?? &lt;BR /&gt;
please correct me if i am not getting it right.  Thanks for help!&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;inputs.conf
[monitor:///var/log/messages]
index = mysyslog
disabled = false
sourcetype = syslog
host = myhost

props.conf
[syslog]
TRANSFORMS-t1 = rename_myhost

transforms.conf
[rename_myhost]
REGEX = ^.*$
DEST_KEY = MetaData:Host
FORMAT = host::myhost
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 20 Dec 2017 07:35:52 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Cannot-change-host-field-in-syslog-data/m-p/199594#M39499</guid>
      <dc:creator>saurabh_tek11</dc:creator>
      <dc:date>2017-12-20T07:35:52Z</dc:date>
    </item>
    <item>
      <title>Re: Cannot change host field in syslog data</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Cannot-change-host-field-in-syslog-data/m-p/199595#M39500</link>
      <description>&lt;P&gt;The above looks correct, but there is already a &lt;CODE&gt;TRANSFORMS = syslog-host&lt;/CODE&gt; defined by default for the &lt;CODE&gt;syslog&lt;/CODE&gt; sourcetype, which might occur after your transform, thus rewriting the &lt;CODE&gt;host&lt;/CODE&gt; field again based on the contents of the syslog message.&lt;/P&gt;</description>
      <pubDate>Wed, 20 Dec 2017 11:55:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Cannot-change-host-field-in-syslog-data/m-p/199595#M39500</guid>
      <dc:creator>micahkemp</dc:creator>
      <dc:date>2017-12-20T11:55:07Z</dc:date>
    </item>
  </channel>
</rss>

