<?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: How do I exclude stream events based on criteria before indexing? in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/How-do-I-exclude-stream-events-based-on-criteria-before-indexing/m-p/388217#M69554</link>
    <description>&lt;P&gt;This didnt actually work given the above log format&lt;/P&gt;</description>
    <pubDate>Fri, 18 Jan 2019 04:01:09 GMT</pubDate>
    <dc:creator>lznger88_2</dc:creator>
    <dc:date>2019-01-18T04:01:09Z</dc:date>
    <item>
      <title>How do I exclude stream events based on criteria before indexing?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-do-I-exclude-stream-events-based-on-criteria-before-indexing/m-p/388213#M69550</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;

&lt;P&gt;I require to exclude events when the 'dest_port=80'. I have gone through other similar examples and have come to the conclusion that it is more poor REGEX skills causing the issue.&lt;/P&gt;

&lt;P&gt;The stream data (netflow v9) goes through a heavy forwarder (HF) prior to the IDX. Below is the props.conf and transforms.conf of the HF, as well as event log:&lt;/P&gt;

&lt;P&gt;props.conf:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[stream:netflow]
TRANSFORMS-null= setnull
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;transforms.conf:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[setnull]
REGEX = "dest_port":53
DEST_KEY = queue
FORMAT = nullQueue
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I have also tried other REGEX, such as &lt;CODE&gt;"(\w+)":80 , "([^\"]+)\":80&lt;/CODE&gt; but they dont seem to be working.&lt;/P&gt;

&lt;P&gt;Event log:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;{"dest_ip":"123.456.789.99","dest_port":80,"event_name":"netFlowData","exporter_ip":"192.192.192.192","exporter_time":"2018-Jan-08 03:47:21","exporter_uptime":1269091254,"firewall_event":1,"flow_id":2950442453,"flow_start_time_milli":1546919225527,"input_snmpidx":5,"netflow_elements":["UNKNOWN : 0000","UNKNOWN : fa14fc27d49102c0abdf8bd4","UNKNOWN : 000000000000000000000000","UNKNOWN : 
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Any help would be great. Thanks in advance&lt;/P&gt;</description>
      <pubDate>Tue, 08 Jan 2019 05:01:28 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-do-I-exclude-stream-events-based-on-criteria-before-indexing/m-p/388213#M69550</guid>
      <dc:creator>lznger88_2</dc:creator>
      <dc:date>2019-01-08T05:01:28Z</dc:date>
    </item>
    <item>
      <title>Re: How do I exclude stream events based on criteria before indexing?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-do-I-exclude-stream-events-based-on-criteria-before-indexing/m-p/388214#M69551</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;Can you please try below config on HF&lt;/P&gt;

&lt;P&gt;transforms.conf&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[setnull]
REGEX = \"dest_port\"\:80
DEST_KEY = queue
FORMAT = nullQueue
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 08 Jan 2019 13:30:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-do-I-exclude-stream-events-based-on-criteria-before-indexing/m-p/388214#M69551</guid>
      <dc:creator>harsmarvania57</dc:creator>
      <dc:date>2019-01-08T13:30:29Z</dc:date>
    </item>
    <item>
      <title>Re: How do I exclude stream events based on criteria before indexing?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-do-I-exclude-stream-events-based-on-criteria-before-indexing/m-p/388215#M69552</link>
      <description>&lt;P&gt;Thanks immensely harsmarvania57.&lt;/P&gt;

&lt;P&gt;The regex you supplied outputs any dest_port when equal to 80* (for example, 80, 801, 8001, etc.) - tested this in Splunk.&lt;/P&gt;

&lt;P&gt;I had to amend it slightly to get the right output based on the above log format:&lt;BR /&gt;
REGEX = \"dest_port\":80\D&lt;/P&gt;</description>
      <pubDate>Wed, 09 Jan 2019 03:57:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-do-I-exclude-stream-events-based-on-criteria-before-indexing/m-p/388215#M69552</guid>
      <dc:creator>lznger88_2</dc:creator>
      <dc:date>2019-01-09T03:57:49Z</dc:date>
    </item>
    <item>
      <title>Re: How do I exclude stream events based on criteria before indexing?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-do-I-exclude-stream-events-based-on-criteria-before-indexing/m-p/388216#M69553</link>
      <description>&lt;P&gt;Or you can use &lt;CODE&gt;REGEX = \"dest_port\"\:80\,&lt;/CODE&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 09 Jan 2019 08:56:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-do-I-exclude-stream-events-based-on-criteria-before-indexing/m-p/388216#M69553</guid>
      <dc:creator>harsmarvania57</dc:creator>
      <dc:date>2019-01-09T08:56:32Z</dc:date>
    </item>
    <item>
      <title>Re: How do I exclude stream events based on criteria before indexing?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-do-I-exclude-stream-events-based-on-criteria-before-indexing/m-p/388217#M69554</link>
      <description>&lt;P&gt;This didnt actually work given the above log format&lt;/P&gt;</description>
      <pubDate>Fri, 18 Jan 2019 04:01:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-do-I-exclude-stream-events-based-on-criteria-before-indexing/m-p/388217#M69554</guid>
      <dc:creator>lznger88_2</dc:creator>
      <dc:date>2019-01-18T04:01:09Z</dc:date>
    </item>
  </channel>
</rss>

