<?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: Host field getting overwritten in syslog processing in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Host-field-getting-overwritten-in-syslog-processing/m-p/33344#M5965</link>
    <description>&lt;P&gt;Fantastic answer!  Thanks!!&lt;/P&gt;</description>
    <pubDate>Mon, 13 Aug 2012 21:45:25 GMT</pubDate>
    <dc:creator>iunderwood</dc:creator>
    <dc:date>2012-08-13T21:45:25Z</dc:date>
    <item>
      <title>Host field getting overwritten in syslog processing</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Host-field-getting-overwritten-in-syslog-processing/m-p/33341#M5962</link>
      <description>&lt;P&gt;Here's an odd one I just noticed.  I'm taking Syslog in from a Cisco PIX and I've got the input set up as such:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[udp://5150]
connection_host = dns
sourcetype = syslog
no_priority_stripping = true
no_appending_timestamp = true
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I've also got a transform which changes the source type:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[iu_cisco_pix]
REGEX = %PIX-\d-[A-Z0-9_]+:
DEST_KEY = MetaData:Sourcetype
FORMAT = sourcetype::cisco_pix
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;When I do a search on the source type, I see a number of entries where the host is changed to "bytes":&lt;/P&gt;

&lt;P&gt;&amp;lt;166&amp;gt;Aug 13 2012 11:20:54: %PIX-6-302014: Teardown TCP connection 19849033 for dmz:10.88.14.179/80 to inside:10.8.63.254/48574 duration 0:00:01 bytes 2528 TCP FINs&lt;/P&gt;

&lt;P&gt;host=bytes   sourcetype=cisco_pix   source=udp:5150  &lt;/P&gt;

&lt;P&gt;Most other lines are fine:&lt;/P&gt;

&lt;P&gt;&amp;lt;166&amp;gt;Aug 13 2012 11:54:09: %PIX-6-302013: Built outbound TCP connection 19853901 for dmz:10.88.14.179/80 (10.88.14.179/80) to inside:10.8.63.254/1183 (10.8.63.254/1183)&lt;/P&gt;

&lt;P&gt;host=eth1.pix-01.network   sourcetype=cisco_pix   source=udp:5150   &lt;/P&gt;

&lt;P&gt;Why does this happen?&lt;/P&gt;

&lt;P&gt;If I change the sourcetype to "cisco" in the input stanza, there are no problems.&lt;/P&gt;</description>
      <pubDate>Mon, 13 Aug 2012 15:57:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Host-field-getting-overwritten-in-syslog-processing/m-p/33341#M5962</guid>
      <dc:creator>iunderwood</dc:creator>
      <dc:date>2012-08-13T15:57:03Z</dc:date>
    </item>
    <item>
      <title>Re: Host field getting overwritten in syslog processing</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Host-field-getting-overwritten-in-syslog-processing/m-p/33342#M5963</link>
      <description>&lt;P&gt;I should mention that if I set the sourcetype in the input stanza to "cisco" instead of "syslog", the overwrites don't happen.&lt;/P&gt;</description>
      <pubDate>Mon, 13 Aug 2012 16:03:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Host-field-getting-overwritten-in-syslog-processing/m-p/33342#M5963</guid>
      <dc:creator>iunderwood</dc:creator>
      <dc:date>2012-08-13T16:03:05Z</dc:date>
    </item>
    <item>
      <title>Re: Host field getting overwritten in syslog processing</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Host-field-getting-overwritten-in-syslog-processing/m-p/33343#M5964</link>
      <description>&lt;P&gt;This is most likely due to the transform that rewrites the host field specifically for the "syslog" sourcetype. It's defined in &lt;CODE&gt;$SPLUNK_HOME/etc/system/local/transforms.conf&lt;/CODE&gt; and looks like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[syslog-host]
DEST_KEY = MetaData:Host
REGEX = :\d\d\s+(?:\d+\s+|(?:user|daemon|local.?)\.\w+\s+)*\[?(\w[\w\.\-]{2,})\]?\s
FORMAT = host::$1
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;The reason for having this transform is that it's a pretty common scenario to have Splunk consume data from a syslog receiver that gets its events from loads of different hosts, so often in that case you'll want to have the host field set to where the events originally came from rather than where Splunk happened to read them.&lt;/P&gt;

&lt;P&gt;The sourcetype renaming happens after the host renaming, so this transform will take effect even though you have a transform that changes the sourcetype to something else than syslog immediately afterwards.&lt;/P&gt;</description>
      <pubDate>Mon, 13 Aug 2012 19:52:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Host-field-getting-overwritten-in-syslog-processing/m-p/33343#M5964</guid>
      <dc:creator>Ayn</dc:creator>
      <dc:date>2012-08-13T19:52:02Z</dc:date>
    </item>
    <item>
      <title>Re: Host field getting overwritten in syslog processing</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Host-field-getting-overwritten-in-syslog-processing/m-p/33344#M5965</link>
      <description>&lt;P&gt;Fantastic answer!  Thanks!!&lt;/P&gt;</description>
      <pubDate>Mon, 13 Aug 2012 21:45:25 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Host-field-getting-overwritten-in-syslog-processing/m-p/33344#M5965</guid>
      <dc:creator>iunderwood</dc:creator>
      <dc:date>2012-08-13T21:45:25Z</dc:date>
    </item>
  </channel>
</rss>

