<?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: Overriding host values using the log data in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Overriding-host-values-using-the-log-data/m-p/32723#M5828</link>
    <description>&lt;P&gt;Can you post your props.conf and transforms.conf  stanzas and I will take a look at it for you.&lt;/P&gt;</description>
    <pubDate>Sat, 21 Apr 2012 03:35:21 GMT</pubDate>
    <dc:creator>Damien_Dallimor</dc:creator>
    <dc:date>2012-04-21T03:35:21Z</dc:date>
    <item>
      <title>Overriding host values using the log data</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Overriding-host-values-using-the-log-data/m-p/32722#M5827</link>
      <description>&lt;P&gt;&lt;A href="http://docs.splunk.com/Documentation/Splunk/latest/Data/overridedefaulthostassignments"&gt;http://docs.splunk.com/Documentation/Splunk/latest/Data/overridedefaulthostassignments&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;I've been trying to set up what should be a very simple regex to extract the hostname out of logs that are formatted like this:&lt;/P&gt;

&lt;P&gt;Apr 20 10:10:10 host=hostname&lt;BR /&gt;
Apr 20 10:10:11 host=hostname-b&lt;/P&gt;

&lt;P&gt;After spending most of the day trying to do this, I decided to try doing what is listed in the Example section of the link mentioned at the top of this message. Using the exact same event data, the exact same props.conf and transforms.conf, my instance of Splunk running on my MacOS laptop is still setting the host field to my local hostname.&lt;/P&gt;

&lt;P&gt;Thanks very much&lt;/P&gt;</description>
      <pubDate>Sat, 21 Apr 2012 01:31:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Overriding-host-values-using-the-log-data/m-p/32722#M5827</guid>
      <dc:creator>pkeller</dc:creator>
      <dc:date>2012-04-21T01:31:04Z</dc:date>
    </item>
    <item>
      <title>Re: Overriding host values using the log data</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Overriding-host-values-using-the-log-data/m-p/32723#M5828</link>
      <description>&lt;P&gt;Can you post your props.conf and transforms.conf  stanzas and I will take a look at it for you.&lt;/P&gt;</description>
      <pubDate>Sat, 21 Apr 2012 03:35:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Overriding-host-values-using-the-log-data/m-p/32723#M5828</guid>
      <dc:creator>Damien_Dallimor</dc:creator>
      <dc:date>2012-04-21T03:35:21Z</dc:date>
    </item>
    <item>
      <title>Re: Overriding host values using the log data</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Overriding-host-values-using-the-log-data/m-p/32724#M5829</link>
      <description>&lt;P&gt;Thank you ...&lt;/P&gt;

&lt;P&gt;props.conf:&lt;/P&gt;

&lt;P&gt;[source::.../unix-cads-alerts]&lt;BR /&gt;
TRANSFORMS-cads = cads&lt;BR /&gt;
SHOULD_LINEMERGE = false&lt;/P&gt;

&lt;P&gt;transforms.conf&lt;BR /&gt;
[cads]&lt;BR /&gt;
DEST_KEY = MetaData:Host&lt;BR /&gt;
REGEX = ^[A-Z][a-z][a-z]\s+\d\d\s+\d\d:\d\d:\d\d\s+host=(\S+)\s+.*&lt;BR /&gt;
FORMAT = host::$1&lt;/P&gt;

&lt;P&gt;here's two lines of data from the file: unix-cads-alerts&lt;/P&gt;

&lt;P&gt;Apr 19 16:15:21 host=ctx-sjc-p33 alert=[CLEAR] details=[cpu10]&lt;BR /&gt;
Apr 19 16:22:10 host=tab-app-002-p alert=[CLEAR] details=[snmp]&lt;/P&gt;</description>
      <pubDate>Sat, 21 Apr 2012 20:46:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Overriding-host-values-using-the-log-data/m-p/32724#M5829</guid>
      <dc:creator>pkeller</dc:creator>
      <dc:date>2012-04-21T20:46:46Z</dc:date>
    </item>
    <item>
      <title>Re: Overriding host values using the log data</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Overriding-host-values-using-the-log-data/m-p/32725#M5830</link>
      <description>&lt;P&gt;Well your regex won't work because you haven't escaped the special characters :&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;REGEX = ^[A-Z][a-z][a-z]\s+\d\d\s+\d\d:\d\d:\d\d\s+host=(\S+)\s+.*
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;FYI , alternatively, you can probably get away with a simpler regex, try this in transforms.conf&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;REGEX = host=([a-zA-Z0-9\._-]+)
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sun, 22 Apr 2012 02:34:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Overriding-host-values-using-the-log-data/m-p/32725#M5830</guid>
      <dc:creator>Damien_Dallimor</dc:creator>
      <dc:date>2012-04-22T02:34:04Z</dc:date>
    </item>
  </channel>
</rss>

