<?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 default host field extraction won't work in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/overriding-default-host-field-extraction-won-t-work/m-p/335358#M62026</link>
    <description>&lt;P&gt;I must be angle-brackets blind.&lt;BR /&gt;
I have looked at the stanzas many many time over the last 4 hours, and never noticed them.&lt;BR /&gt;
Thank you so much.&lt;/P&gt;</description>
    <pubDate>Sun, 04 Jun 2017 20:42:42 GMT</pubDate>
    <dc:creator>sansay</dc:creator>
    <dc:date>2017-06-04T20:42:42Z</dc:date>
    <item>
      <title>overriding default host field extraction won't work</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/overriding-default-host-field-extraction-won-t-work/m-p/335356#M62024</link>
      <description>&lt;P&gt;After spending 4 hours trying to make this work I am out of ideas.&lt;BR /&gt;
Here is my final setup and it is what I think should work:&lt;/P&gt;

&lt;P&gt;Sample event:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;Jun  4 09:58:04 10.237.94.1 1 2017-06-04T16:58:03.876Z lvs.fwc.p1087-34 RT_FLOW - RT_FLOW_SESSION_DENY [junos@2636.1.1.1.2.28 source-address="...
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;props.conf stanza:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[juniper:junos:firewall]
TRANSFORMS-&amp;lt;juniper-fw-host&amp;gt; = &amp;lt;juniper-firewall-host-override&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;transforms.conf stanza&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[juniper-firewall-host-override]
DEST_KEY = MetaData:Host
REGEX = \s(\w+\.\w+\.\w\d+-*\d*)\s
FORMAT = host::$1
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I tested the REGEX with REX in a search like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=sec_fw sourcetype=juniper:junos:firewall | rex "\s(?P&amp;lt;host2&amp;gt;\w+\.\w+\.\w\d+-*\d*)\s"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;And it works, the correct field/value pair appears in the field pane.&lt;BR /&gt;
My indexing time field extraction should replace the syslog host name with "lvs.fwc.p1087-34".&lt;BR /&gt;
I read and read the RTFM, followed the instructions to the letter, and yet, it just won't work.&lt;BR /&gt;
Any help will be very much appreciated.&lt;/P&gt;</description>
      <pubDate>Sun, 04 Jun 2017 17:40:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/overriding-default-host-field-extraction-won-t-work/m-p/335356#M62024</guid>
      <dc:creator>sansay</dc:creator>
      <dc:date>2017-06-04T17:40:13Z</dc:date>
    </item>
    <item>
      <title>Re: overriding default host field extraction won't work</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/overriding-default-host-field-extraction-won-t-work/m-p/335357#M62025</link>
      <description>&lt;P&gt;@sansay&lt;/P&gt;

&lt;P&gt;Two things to check.&lt;/P&gt;

&lt;OL&gt;
&lt;LI&gt;That your props/transforms are configured on the indexer since this is an index-time field extraction&lt;/LI&gt;
&lt;LI&gt;Take out the brackets from your props.conf surrounding juniper-fw-host and juniper-firewall-host-override&lt;/LI&gt;
&lt;/OL&gt;

&lt;P&gt;Here is an example that should work for you:&lt;BR /&gt;
&lt;STRONG&gt;inputs.conf (forwarder)&lt;/STRONG&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[monitor:///opt/splunkforwarder/logs/test.log]
index=main
sourcetype= juniper:junos:firewall
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;&lt;STRONG&gt;props.conf (indexer)&lt;/STRONG&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[juniper:junos:firewall]
TRANSFORMS-juniper-fw-host = juniper-firewall-host-override
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;&lt;STRONG&gt;transforms.conf (indexer)&lt;/STRONG&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[juniper-firewall-host-override]
DEST_KEY = MetaData:Host
REGEX = \s(\w+\.\w+\.\w\d+-*\d*)\s
FORMAT = host::$1
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;restart Splunk after configurations are made&lt;/P&gt;</description>
      <pubDate>Sun, 04 Jun 2017 18:30:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/overriding-default-host-field-extraction-won-t-work/m-p/335357#M62025</guid>
      <dc:creator>rphillips_splk</dc:creator>
      <dc:date>2017-06-04T18:30:40Z</dc:date>
    </item>
    <item>
      <title>Re: overriding default host field extraction won't work</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/overriding-default-host-field-extraction-won-t-work/m-p/335358#M62026</link>
      <description>&lt;P&gt;I must be angle-brackets blind.&lt;BR /&gt;
I have looked at the stanzas many many time over the last 4 hours, and never noticed them.&lt;BR /&gt;
Thank you so much.&lt;/P&gt;</description>
      <pubDate>Sun, 04 Jun 2017 20:42:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/overriding-default-host-field-extraction-won-t-work/m-p/335358#M62026</guid>
      <dc:creator>sansay</dc:creator>
      <dc:date>2017-06-04T20:42:42Z</dc:date>
    </item>
  </channel>
</rss>

