<?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: REGEX and NullQueue problem in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/REGEX-and-NullQueue-problem/m-p/118954#M31852</link>
    <description>&lt;P&gt;Thanks, I'll run the tests now and then report back soon!&lt;/P&gt;</description>
    <pubDate>Mon, 28 Oct 2013 21:42:58 GMT</pubDate>
    <dc:creator>echojacques</dc:creator>
    <dc:date>2013-10-28T21:42:58Z</dc:date>
    <item>
      <title>REGEX and NullQueue problem</title>
      <link>https://community.splunk.com/t5/Splunk-Search/REGEX-and-NullQueue-problem/m-p/118952#M31850</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;

&lt;P&gt;I have setup a nullqueue to drop certain types of traffic.  The traffic I want to drop is dest_port=53, any traffic from 10.10.10.10, and any traffic from the private IP address range: 169.254*.  This is how I have my nullqueue setup:&lt;/P&gt;

&lt;P&gt;In my /splunk/etc/system/local/transforms.conf I have:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[setnullitems]
REGEX=dest_port=53|10.10.10.10|169.254*
DEST_KEY=queue
FORMAT=nullQueue
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;In my /splunk/etc/system/local/props.conf I have:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;TRANSFORMS-null=setnullitems
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;But the above doesn't work... does anyone know what I have done wrong?  Thanks!&lt;/P&gt;</description>
      <pubDate>Mon, 28 Oct 2013 21:22:56 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/REGEX-and-NullQueue-problem/m-p/118952#M31850</guid>
      <dc:creator>echojacques</dc:creator>
      <dc:date>2013-10-28T21:22:56Z</dc:date>
    </item>
    <item>
      <title>Re: REGEX and NullQueue problem</title>
      <link>https://community.splunk.com/t5/Splunk-Search/REGEX-and-NullQueue-problem/m-p/118953#M31851</link>
      <description>&lt;P&gt;I think you need a different regular expression. I don't think that one is doing what you want.&lt;/P&gt;

&lt;P&gt;To test it, run this search (assuming that the events are ending up in the &lt;CODE&gt;main&lt;/CODE&gt; index instead of being filtered):&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=main 
| regex _raw="dest_port=53|10.10.10.10|169.254*"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;And I think you will find that it does not match any events. Try this instead, in your &lt;CODE&gt;transforms.conf&lt;/CODE&gt; stanza:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;REGEX=(?:dest_port\=53)|(?:10\.10\.10\.10)|(?:169\.254.*)
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Again, to test this, run the following search&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=main 
| regex _raw="(?:dest_port\=53)|(?:10\.10\.10\.10)|(?:169\.254.*)"
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 28 Oct 2013 21:39:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/REGEX-and-NullQueue-problem/m-p/118953#M31851</guid>
      <dc:creator>lguinn2</dc:creator>
      <dc:date>2013-10-28T21:39:24Z</dc:date>
    </item>
    <item>
      <title>Re: REGEX and NullQueue problem</title>
      <link>https://community.splunk.com/t5/Splunk-Search/REGEX-and-NullQueue-problem/m-p/118954#M31852</link>
      <description>&lt;P&gt;Thanks, I'll run the tests now and then report back soon!&lt;/P&gt;</description>
      <pubDate>Mon, 28 Oct 2013 21:42:58 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/REGEX-and-NullQueue-problem/m-p/118954#M31852</guid>
      <dc:creator>echojacques</dc:creator>
      <dc:date>2013-10-28T21:42:58Z</dc:date>
    </item>
    <item>
      <title>Re: REGEX and NullQueue problem</title>
      <link>https://community.splunk.com/t5/Splunk-Search/REGEX-and-NullQueue-problem/m-p/118955#M31853</link>
      <description>&lt;P&gt;hmm they are both returning hundreds of matched events in the last 15 minutes...&lt;/P&gt;</description>
      <pubDate>Mon, 28 Oct 2013 21:51:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/REGEX-and-NullQueue-problem/m-p/118955#M31853</guid>
      <dc:creator>echojacques</dc:creator>
      <dc:date>2013-10-28T21:51:26Z</dc:date>
    </item>
    <item>
      <title>Re: REGEX and NullQueue problem</title>
      <link>https://community.splunk.com/t5/Splunk-Search/REGEX-and-NullQueue-problem/m-p/118956#M31854</link>
      <description>&lt;P&gt;Are they the &lt;EM&gt;right&lt;/EM&gt; events? The regular expression is looking for events that match one or more of the following patterns:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;dest_port=53

10.10.10.10

169.254
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;These patterns can appear anywhere in the event and it should match. I would also search for these individually, just to see if they make sense - in other words, I would run three searches, one for each phrase.&lt;/P&gt;</description>
      <pubDate>Mon, 28 Oct 2013 22:10:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/REGEX-and-NullQueue-problem/m-p/118956#M31854</guid>
      <dc:creator>lguinn2</dc:creator>
      <dc:date>2013-10-28T22:10:29Z</dc:date>
    </item>
    <item>
      <title>Re: REGEX and NullQueue problem</title>
      <link>https://community.splunk.com/t5/Splunk-Search/REGEX-and-NullQueue-problem/m-p/118957#M31855</link>
      <description>&lt;P&gt;Thanks and yes, they are the right events.  I think the problem is not the REGEX syntax but instead the nullqueue (which I've struggled with many times before)... is there anything special needed to include an OR "|" in the nullqueue?  Or would it be better to just have multiple nullqueues instead of just putting all of the statements into one nullqueue?&lt;/P&gt;</description>
      <pubDate>Mon, 28 Oct 2013 22:32:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/REGEX-and-NullQueue-problem/m-p/118957#M31855</guid>
      <dc:creator>echojacques</dc:creator>
      <dc:date>2013-10-28T22:32:54Z</dc:date>
    </item>
    <item>
      <title>Re: REGEX and NullQueue problem</title>
      <link>https://community.splunk.com/t5/Splunk-Search/REGEX-and-NullQueue-problem/m-p/118958#M31856</link>
      <description>&lt;P&gt;In your REGEX, what does the "?:" do?&lt;/P&gt;</description>
      <pubDate>Mon, 28 Oct 2013 22:58:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/REGEX-and-NullQueue-problem/m-p/118958#M31856</guid>
      <dc:creator>echojacques</dc:creator>
      <dc:date>2013-10-28T22:58:00Z</dc:date>
    </item>
    <item>
      <title>Re: REGEX and NullQueue problem</title>
      <link>https://community.splunk.com/t5/Splunk-Search/REGEX-and-NullQueue-problem/m-p/118959#M31857</link>
      <description>&lt;P&gt;The &lt;CODE&gt;?:&lt;/CODE&gt; is part of the &lt;CODE&gt;(?: )&lt;/CODE&gt; pattern - it is called a "non-capturing group"&lt;/P&gt;

&lt;P&gt;By making the sub-expressions into non-capturing groups, I am making it clear that the alternatives are between the sub-expressions. If you just use parentheses, that is a "capture group" in regular expressions, and that often means "field extraction" to Splunk - which is &lt;EM&gt;not&lt;/EM&gt; what I want.&lt;/P&gt;

&lt;P&gt;The &lt;CODE&gt;|&lt;/CODE&gt; should work in the regular expression - you shouldn't need to do anything special.&lt;/P&gt;</description>
      <pubDate>Tue, 29 Oct 2013 00:07:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/REGEX-and-NullQueue-problem/m-p/118959#M31857</guid>
      <dc:creator>lguinn2</dc:creator>
      <dc:date>2013-10-29T00:07:38Z</dc:date>
    </item>
    <item>
      <title>Re: REGEX and NullQueue problem</title>
      <link>https://community.splunk.com/t5/Splunk-Search/REGEX-and-NullQueue-problem/m-p/118960#M31858</link>
      <description>&lt;P&gt;Other questions:&lt;/P&gt;

&lt;P&gt;Can you show the complete stanza in props.conf that contains&lt;BR /&gt;&lt;BR /&gt;
&lt;CODE&gt;TRANSFORMS-null=setnullitems&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;Are there any other transforms with the classname &lt;CODE&gt;null&lt;/CODE&gt;? This name needs to be unique.&lt;/P&gt;</description>
      <pubDate>Tue, 29 Oct 2013 00:11:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/REGEX-and-NullQueue-problem/m-p/118960#M31858</guid>
      <dc:creator>lguinn2</dc:creator>
      <dc:date>2013-10-29T00:11:01Z</dc:date>
    </item>
    <item>
      <title>Re: REGEX and NullQueue problem</title>
      <link>https://community.splunk.com/t5/Splunk-Search/REGEX-and-NullQueue-problem/m-p/118961#M31859</link>
      <description>&lt;P&gt;Hi, thanks for the info and for teaching me about the (?:) non-capturing group syntax.  I'm going to try a few things and then post my results here a little later today.  Also, there are no other transforms with the classname null in my props.conf.&lt;/P&gt;</description>
      <pubDate>Tue, 29 Oct 2013 14:44:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/REGEX-and-NullQueue-problem/m-p/118961#M31859</guid>
      <dc:creator>echojacques</dc:creator>
      <dc:date>2013-10-29T14:44:44Z</dc:date>
    </item>
    <item>
      <title>Re: REGEX and NullQueue problem</title>
      <link>https://community.splunk.com/t5/Splunk-Search/REGEX-and-NullQueue-problem/m-p/118962#M31860</link>
      <description>&lt;P&gt;So I'm not sure why, but after lots of testing, this is what ended up working for me:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;REGEX=dest_port=53\b|10.10.10.10\b|169.254.*
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I added the "\b" to specify port 53 and not 533, 5333, etc.  Also, whenever I added the \escape characters in the IP address it would not work.  Not sure why but at least it's working now.  Thanks for your help!&lt;/P&gt;</description>
      <pubDate>Tue, 29 Oct 2013 21:19:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/REGEX-and-NullQueue-problem/m-p/118962#M31860</guid>
      <dc:creator>echojacques</dc:creator>
      <dc:date>2013-10-29T21:19:34Z</dc:date>
    </item>
    <item>
      <title>Re: REGEX and NullQueue problem</title>
      <link>https://community.splunk.com/t5/Splunk-Search/REGEX-and-NullQueue-problem/m-p/118963#M31861</link>
      <description>&lt;P&gt;I just realized what part of the problem &lt;EM&gt;might&lt;/EM&gt; have been. Sometimes Splunk gets confused when a regular expression contains an equals sign, since the equals sign is also part of the transforms.conf syntax. So watch out for that in the future!&lt;/P&gt;

&lt;P&gt;Good idea with the &lt;CODE&gt;\b&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;BTW, it shouldn't be a problem here, but remember that the period (&lt;CODE&gt;.&lt;/CODE&gt;) is the wild-card character in regular expressions. For example &lt;CODE&gt;10z10b10c10&lt;/CODE&gt; would actually match the regular expression string &lt;CODE&gt;10.10.10.10&lt;/CODE&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 29 Oct 2013 23:00:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/REGEX-and-NullQueue-problem/m-p/118963#M31861</guid>
      <dc:creator>lguinn2</dc:creator>
      <dc:date>2013-10-29T23:00:43Z</dc:date>
    </item>
  </channel>
</rss>

