<?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: Filtering Specific Data from a host in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-filter-Specific-Data-from-a-host/m-p/597342#M207968</link>
    <description>&lt;P&gt;The question is how you're getting that data. Typically the host is either set for a specific input, or might be (for example with HEC) pushed by the source with the event data.&lt;/P&gt;</description>
    <pubDate>Wed, 11 May 2022 09:02:30 GMT</pubDate>
    <dc:creator>PickleRick</dc:creator>
    <dc:date>2022-05-11T09:02:30Z</dc:date>
    <item>
      <title>How to filter Specific Data from a host?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-filter-Specific-Data-from-a-host/m-p/597330#M207964</link>
      <description>&lt;P&gt;Hi there - I am trying to filter out some noisy rules in a specific firewall (FWCL01) from being ingested into splunk.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;On my Heavy forwearder that send into splunk i have applied the following props.conf and transform.conf&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;PROPS.CONF&lt;/P&gt;
&lt;P&gt;[host::FWCL01]&lt;BR /&gt;TRANSFORMS-set_null = FWCL01_ruleid0_to_null, FWCL01_ruleid4_to_null&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;TRANSFORMS.CONF&lt;/P&gt;
&lt;P&gt;[FWCL01_ruleid0_to_null]&lt;BR /&gt;REGEX = policyid=0&lt;BR /&gt;DEST_KEY = queue&lt;BR /&gt;FORMAT = nullQueue&lt;/P&gt;
&lt;P&gt;[FWCL01_ruleid4_to_null]&lt;BR /&gt;REGEX = policyid=4&lt;BR /&gt;DEST_KEY = queue&lt;BR /&gt;FORMAT = nullQueue&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This doesnt seem to work. However when i change props.conf to us the sourcetype [fgt-traffic] as per below it works&lt;/P&gt;
&lt;P&gt;[fgt_traffic]&lt;/P&gt;
&lt;P&gt;TRANSFORMS-set_null = FWCL01_ruleid0_to_null, FWCL01_ruleid4_to_null&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The logs show as following:&lt;/P&gt;
&lt;P&gt;&lt;SPAN class=""&gt;May&lt;/SPAN&gt; &lt;SPAN class=""&gt;11&lt;/SPAN&gt; &lt;SPAN class=""&gt;16:12:54&lt;/SPAN&gt; &lt;SPAN class=""&gt;10.8.11.1&lt;/SPAN&gt; &lt;SPAN class=""&gt;logver=602101263&lt;/SPAN&gt; &lt;SPAN class=""&gt;timestamp=1652256773&lt;/SPAN&gt; &lt;SPAN class=""&gt;devname=&lt;/SPAN&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;SPAN class=""&gt;FWCL01&lt;/SPAN&gt;&lt;SPAN&gt;" &lt;/SPAN&gt;&lt;SPAN class=""&gt;devid=&lt;/SPAN&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;SPAN class=""&gt;XXXXXXX&lt;/SPAN&gt;&lt;SPAN&gt;" &lt;/SPAN&gt;&lt;SPAN class=""&gt;vd=&lt;/SPAN&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;SPAN class=""&gt;Outer-DMZ&lt;/SPAN&gt;&lt;SPAN&gt;" &lt;/SPAN&gt;&lt;SPAN class=""&gt;date=2022-05-11&lt;/SPAN&gt; &lt;SPAN class=""&gt;time=16:12:53&lt;/SPAN&gt; &lt;SPAN class=""&gt;logid=&lt;/SPAN&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;SPAN class=""&gt;0000000013&lt;/SPAN&gt;&lt;SPAN&gt;" &lt;/SPAN&gt;&lt;SPAN class=""&gt;type=&lt;/SPAN&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;SPAN class=""&gt;traffic&lt;/SPAN&gt;&lt;SPAN&gt;" &lt;/SPAN&gt;&lt;SPAN class=""&gt;subtype=&lt;/SPAN&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;SPAN class=""&gt;forward&lt;/SPAN&gt;&lt;SPAN&gt;" &lt;/SPAN&gt;&lt;SPAN class=""&gt;level=&lt;/SPAN&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;SPAN class=""&gt;notice&lt;/SPAN&gt;&lt;SPAN&gt;" &lt;/SPAN&gt;&lt;SPAN class=""&gt;eventtime=1652256774280610010&lt;/SPAN&gt; &lt;SPAN class=""&gt;tz=&lt;/SPAN&gt;&lt;SPAN&gt;"+&lt;/SPAN&gt;&lt;SPAN class=""&gt;0800&lt;/SPAN&gt;&lt;SPAN&gt;" &lt;/SPAN&gt;&lt;SPAN class=""&gt;srcip=45.143.203.10&lt;/SPAN&gt; &lt;SPAN class=""&gt;srcport=8080&lt;/SPAN&gt; &lt;SPAN class=""&gt;srcintf=&lt;/SPAN&gt;&lt;SPAN&gt;"XXXX&lt;/SPAN&gt;&lt;SPAN&gt;" &lt;/SPAN&gt;&lt;SPAN class=""&gt;srcintfrole=&lt;/SPAN&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;SPAN class=""&gt;lan&lt;/SPAN&gt;&lt;SPAN&gt;" &lt;/SPAN&gt;&lt;SPAN class=""&gt;dstip=XXXX&lt;/SPAN&gt;&amp;nbsp;&lt;SPAN class=""&gt;dstport=8088&lt;/SPAN&gt; &lt;SPAN class=""&gt;dstintf=&lt;/SPAN&gt;&lt;SPAN&gt;"XXXX&lt;/SPAN&gt;&lt;SPAN&gt;" &lt;/SPAN&gt;&lt;SPAN class=""&gt;dstintfrole=&lt;/SPAN&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;SPAN class=""&gt;undefined&lt;/SPAN&gt;&lt;SPAN&gt;" &lt;/SPAN&gt;&lt;SPAN class=""&gt;srcinetsvc=&lt;/SPAN&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;SPAN class=""&gt;Malicious-Malicious.Server&lt;/SPAN&gt;&lt;SPAN&gt;" &lt;/SPAN&gt;&lt;SPAN class=""&gt;sessionid=2932531463&lt;/SPAN&gt; &lt;SPAN class=""&gt;proto=6&lt;/SPAN&gt; &lt;SPAN class=""&gt;action=&lt;/SPAN&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;SPAN class=""&gt;deny&lt;/SPAN&gt;&lt;SPAN&gt;" &lt;/SPAN&gt;&lt;SPAN class=""&gt;policyid=4&lt;/SPAN&gt; &lt;SPAN class=""&gt;policytype=&lt;/SPAN&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;SPAN class=""&gt;policy&lt;/SPAN&gt;&lt;SPAN&gt;" &lt;/SPAN&gt;&lt;SPAN class=""&gt;poluuid=&lt;/SPAN&gt;&lt;SPAN&gt;"XXXXX&lt;/SPAN&gt;&lt;SPAN&gt;" &lt;/SPAN&gt;&lt;SPAN class=""&gt;service=&lt;/SPAN&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;SPAN class=""&gt;tcp/8088&lt;/SPAN&gt;&lt;SPAN&gt;" &lt;/SPAN&gt;&lt;SPAN class=""&gt;dstcountry=&lt;/SPAN&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;SPAN class=""&gt;Australia&lt;/SPAN&gt;&lt;SPAN&gt;" &lt;/SPAN&gt;&lt;SPAN class=""&gt;srccountry=&lt;/SPAN&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;SPAN class=""&gt;Netherlands&lt;/SPAN&gt;&lt;SPAN&gt;" &lt;/SPAN&gt;&lt;SPAN class=""&gt;trandisp=&lt;/SPAN&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;SPAN class=""&gt;noop&lt;/SPAN&gt;&lt;SPAN&gt;" &lt;/SPAN&gt;&lt;SPAN class=""&gt;duration=0&lt;/SPAN&gt; &lt;SPAN class=""&gt;sentbyte=0&lt;/SPAN&gt; &lt;SPAN class=""&gt;rcvdbyte=0&lt;/SPAN&gt; &lt;SPAN class=""&gt;sentpkt=0&lt;/SPAN&gt; &lt;SPAN class=""&gt;appcat=&lt;/SPAN&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;SPAN class=""&gt;unscanned&lt;/SPAN&gt;&lt;SPAN&gt;" &lt;/SPAN&gt;&lt;SPAN class=""&gt;crscore=30&lt;/SPAN&gt; &lt;SPAN class=""&gt;craction=131072&lt;/SPAN&gt; &lt;SPAN class=""&gt;crlevel=&lt;/SPAN&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;SPAN class=""&gt;high&lt;/SPAN&gt;&lt;SPAN&gt;" &lt;/SPAN&gt;&lt;SPAN class=""&gt;mastersrcmac=&lt;/SPAN&gt;&lt;SPAN&gt;"XXXXX&lt;/SPAN&gt;&lt;SPAN&gt;" &lt;/SPAN&gt;&lt;SPAN class=""&gt;srcmac=&lt;/SPAN&gt;&lt;SPAN&gt;"XXXXX&lt;/SPAN&gt;&lt;SPAN&gt;" &lt;/SPAN&gt;&lt;SPAN class=""&gt;srcserver=0&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;When i use btool it looks like the correct props are being applied&lt;/P&gt;
&lt;P&gt;D:\Program Files\Splunk\bin&amp;gt;splunk btool props list | findstr FWCL01&lt;BR /&gt;[host::FWCL01]&lt;BR /&gt;TRANSFORMS-set_null = FWCL01_ruleid0_to_null, FWCL01_ruleid4_to_null&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class=""&gt;Any idea's?&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 11 May 2022 22:53:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-filter-Specific-Data-from-a-host/m-p/597330#M207964</guid>
      <dc:creator>nick_currie</dc:creator>
      <dc:date>2022-05-11T22:53:14Z</dc:date>
    </item>
    <item>
      <title>Re: Filtering Specific Data from a host</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-filter-Specific-Data-from-a-host/m-p/597337#M207966</link>
      <description>&lt;P&gt;At first glance looks pretty OK. Are you 100% sure the host value is right? (bonus question - isn't the host value extracted and overwritten in transforms?)&lt;/P&gt;</description>
      <pubDate>Wed, 11 May 2022 08:36:45 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-filter-Specific-Data-from-a-host/m-p/597337#M207966</guid>
      <dc:creator>PickleRick</dc:creator>
      <dc:date>2022-05-11T08:36:45Z</dc:date>
    </item>
    <item>
      <title>Re: Filtering Specific Data from a host</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-filter-Specific-Data-from-a-host/m-p/597338#M207967</link>
      <description>&lt;P&gt;Aha - OK this might be where I am going wrong. The host is right - but I cant see the host field within the event log entry when i look at the source.. Is this why its not triggering? do I need to use devname field &lt;SPAN class=""&gt;devname=&lt;/SPAN&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;SPAN class=""&gt;FWCL01&lt;/SPAN&gt;&lt;SPAN&gt;"?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;These logs are sent from a Fortianalyzer to a syslog - so perhaps the Host value is generated in a different part of the process&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 11 May 2022 08:45:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-filter-Specific-Data-from-a-host/m-p/597338#M207967</guid>
      <dc:creator>nick_currie</dc:creator>
      <dc:date>2022-05-11T08:45:14Z</dc:date>
    </item>
    <item>
      <title>Re: Filtering Specific Data from a host</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-filter-Specific-Data-from-a-host/m-p/597342#M207968</link>
      <description>&lt;P&gt;The question is how you're getting that data. Typically the host is either set for a specific input, or might be (for example with HEC) pushed by the source with the event data.&lt;/P&gt;</description>
      <pubDate>Wed, 11 May 2022 09:02:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-filter-Specific-Data-from-a-host/m-p/597342#M207968</guid>
      <dc:creator>PickleRick</dc:creator>
      <dc:date>2022-05-11T09:02:30Z</dc:date>
    </item>
    <item>
      <title>Re: Filtering Specific Data from a host</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-filter-Specific-Data-from-a-host/m-p/597344#M207970</link>
      <description>&lt;P&gt;Sorry bear with me here - i have inherited this environment and am a splunk n00b -&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So it looks like we have the Splunk_TA_fortinet_fortigate app installed and this generates the hostname from the devname based on the transforms.conf file in that app as shown below: does this mean i cannot filter on HF's based on the host value?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;##sourcetype&lt;BR /&gt;[force_sourcetype_fgt]&lt;BR /&gt;SOURCE_KEY = _raw&lt;BR /&gt;DEST_KEY = MetaData:Sourcetype&lt;BR /&gt;REGEX = ^.+?devid=\"?F(?:G|W|6K).+?(?:\s|\,|\,\s)type=\"?(traffic|utm|event|anomaly)&lt;BR /&gt;FORMAT = sourcetype::fgt_$1&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;[fgt_change_hostname]&lt;BR /&gt;SOURCE_KEY = _raw&lt;BR /&gt;DEST_KEY = MetaData:Host&lt;BR /&gt;REGEX = ^.+?devname=\"(\S+)\"\s&lt;BR /&gt;FORMAT = host::$1&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;## LOOKUP&lt;/P&gt;&lt;P&gt;[ftnt_protocol_lookup]&lt;BR /&gt;filename = ftnt_protocol_info.csv&lt;/P&gt;&lt;P&gt;[ftnt_action_lookup]&lt;BR /&gt;filename = ftnt_action_info.csv&lt;/P&gt;&lt;P&gt;[ftnt_event_action_lookup]&lt;BR /&gt;filename = ftnt_event_action_info.csv&lt;/P&gt;&lt;P&gt;## REPORT&lt;/P&gt;&lt;P&gt;[field_extract]&lt;BR /&gt;DELIMS = "\ ,", "="&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 11 May 2022 09:09:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-filter-Specific-Data-from-a-host/m-p/597344#M207970</guid>
      <dc:creator>nick_currie</dc:creator>
      <dc:date>2022-05-11T09:09:16Z</dc:date>
    </item>
    <item>
      <title>Re: Filtering Specific Data from a host</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-filter-Specific-Data-from-a-host/m-p/597346#M207971</link>
      <description>&lt;P&gt;Apparently the priorities are so that [source::*] pattern settings are applied first, then [host::*] and at the end the general sourcetype settings. And the resulting settings to be applied are decided as far as I remember with the values at the beginning of the parsing/transforming process (so that overwritten field values are not taken into account), you can'd match to this value of yours. (as a side trivia - you cannot make a loop with overwriting metadata; I tried ;-)). So you have to either attach your transforms to the sourcetype-level settings or check for the original host field value, before rewriting. It will most probably be either set on the input or will come from the hostname of the forwarder getting the events from your fortigate devices.&lt;/P&gt;</description>
      <pubDate>Wed, 11 May 2022 09:34:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-filter-Specific-Data-from-a-host/m-p/597346#M207971</guid>
      <dc:creator>PickleRick</dc:creator>
      <dc:date>2022-05-11T09:34:14Z</dc:date>
    </item>
    <item>
      <title>Re: Filtering Specific Data from a host</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-filter-Specific-Data-from-a-host/m-p/597369#M207975</link>
      <description>&lt;P&gt;Thank you very much for all your help Rick! Unfortunately the original host is a syslog server that has a few different input files - however the file that holds all the forti events is a single input as it's aggregated byour Fortianalyzer device.&lt;/P&gt;&lt;P&gt;Plan B i think will have to be a fairly lengthy regexp that has both the policy ID and deviceid. Our Heavy Forwarders have resonable processing power however they are already sitting around 50% util - hopefully this extra pattern matching will not create too much of an overhead.&lt;/P&gt;</description>
      <pubDate>Wed, 11 May 2022 11:41:22 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-filter-Specific-Data-from-a-host/m-p/597369#M207975</guid>
      <dc:creator>nick_currie</dc:creator>
      <dc:date>2022-05-11T11:41:22Z</dc:date>
    </item>
  </channel>
</rss>

