<?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: Why is nullQueue not working with regex? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Why-is-nullQueue-not-working-with-regex/m-p/154345#M43417</link>
    <description>&lt;P&gt;Sorry, the regex is correct in the transforms file, I merely changed it to say "company". I would rather keep the sed command because otherwise the events would look like the example below. Also, I have tried with (9) or (.) which should correct the events before or after the sed command. I will try the regex with a wider reach though. &lt;/P&gt;

&lt;P&gt;Example of DNS query before sed command &lt;BR /&gt;
(5)drive(6)google(3)com(0)&lt;/P&gt;

&lt;P&gt;Example after sed command&lt;BR /&gt;
.drive.google.com.&lt;/P&gt;</description>
    <pubDate>Thu, 23 Apr 2015 03:01:03 GMT</pubDate>
    <dc:creator>Thomas_Aneiro</dc:creator>
    <dc:date>2015-04-23T03:01:03Z</dc:date>
    <item>
      <title>Why is nullQueue not working with regex?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-is-nullQueue-not-working-with-regex/m-p/154343#M43415</link>
      <description>&lt;P&gt;I am trying to pull in Windows DNS logs, but drop all internal requests. I have been able to get the logs in, and have used a SEDcmd in props.conf to change "(7)outlook(7)company(3)com(0)" to ".outlook.company.com." but it will not drop the internal requests whether I use a regex of pre-sedcmd or post. Am I doing something wrong here? From what I have read in the below links this should be working.&lt;BR /&gt;
answers.splunk(.)com/answers/35259/best-method-for-pulling-microsoft-dns-logs-with-splunk.html#answer-37702&lt;BR /&gt;
stratumsecurity(.)com/2012/07/03/splunk-security/#more-896&lt;/P&gt;

&lt;H2&gt;In props.conf&lt;/H2&gt;

&lt;PRE&gt;&lt;CODE&gt;[win_dns_logs]
TRANSFORMS-set = dropline
SHOULD_LINEMERGE=false
TIME_PREFIX = ^
TIME_FORMAT=%m/%d/%y %H:%M:%S
TZ = US/Eastern
#Fixing url formatting
SEDCMD-win_dns_index = s/\(\d+\)/./g
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;H2&gt;In transforms.conf I have tried either of the regexes&lt;/H2&gt;

&lt;PRE&gt;&lt;CODE&gt;[dropline]
REGEX = \(.\)[Cc][Oo][Mm][Pp][Aa][Nn][Yy]\(.\)[Cc][Oo][Mm]
#REGEX = \(9\)[Cc][Oo][Mm][Pp][Aa][Nn][Yy]\(3\)[Cc][Oo][Mm]
DEST_KEY = queue
FORMAT = nullQueue
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 22 Apr 2015 19:22:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-is-nullQueue-not-working-with-regex/m-p/154343#M43415</guid>
      <dc:creator>Thomas_Aneiro</dc:creator>
      <dc:date>2015-04-22T19:22:40Z</dc:date>
    </item>
    <item>
      <title>Re: Why is nullQueue not working with regex?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-is-nullQueue-not-working-with-regex/m-p/154344#M43416</link>
      <description>&lt;P&gt;Give this REGEX a shot without the SEDCMD:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;(?i)\(\d*\)company\(\d*\)com
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Your example has (7), but your regex has (9) so that might fix that.&lt;/P&gt;</description>
      <pubDate>Wed, 22 Apr 2015 21:45:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-is-nullQueue-not-working-with-regex/m-p/154344#M43416</guid>
      <dc:creator>martin_mueller</dc:creator>
      <dc:date>2015-04-22T21:45:54Z</dc:date>
    </item>
    <item>
      <title>Re: Why is nullQueue not working with regex?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-is-nullQueue-not-working-with-regex/m-p/154345#M43417</link>
      <description>&lt;P&gt;Sorry, the regex is correct in the transforms file, I merely changed it to say "company". I would rather keep the sed command because otherwise the events would look like the example below. Also, I have tried with (9) or (.) which should correct the events before or after the sed command. I will try the regex with a wider reach though. &lt;/P&gt;

&lt;P&gt;Example of DNS query before sed command &lt;BR /&gt;
(5)drive(6)google(3)com(0)&lt;/P&gt;

&lt;P&gt;Example after sed command&lt;BR /&gt;
.drive.google.com.&lt;/P&gt;</description>
      <pubDate>Thu, 23 Apr 2015 03:01:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-is-nullQueue-not-working-with-regex/m-p/154345#M43417</guid>
      <dc:creator>Thomas_Aneiro</dc:creator>
      <dc:date>2015-04-23T03:01:03Z</dc:date>
    </item>
    <item>
      <title>Re: Why is nullQueue not working with regex?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-is-nullQueue-not-working-with-regex/m-p/154346#M43418</link>
      <description>&lt;P&gt;Update - Still not working even after using the regex below. &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;Regex = ^.*[Cc][Oo][Mm][Pp][Aa][Nn][Yy](.)[Cc][Oo][Mm].*$/g
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 23 Apr 2015 15:14:12 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-is-nullQueue-not-working-with-regex/m-p/154346#M43418</guid>
      <dc:creator>Thomas_Aneiro</dc:creator>
      <dc:date>2015-04-23T15:14:12Z</dc:date>
    </item>
    <item>
      <title>Re: Why is nullQueue not working with regex?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-is-nullQueue-not-working-with-regex/m-p/154347#M43419</link>
      <description>&lt;P&gt;Check the sourcetype win_dns_logs in props.conf on the forwarder, to see if it is pre-parsed at the forwarder level.&lt;BR /&gt;
this is usually the case for csv like formats,  look for  see &lt;STRONG&gt;INDEXED_EXTRACTIONS&lt;/STRONG&gt; settings &lt;BR /&gt;
see &lt;A href="http://docs.splunk.com/Documentation/Splunk/6.2.2/Data/Extractfieldsfromfileheadersatindextime" target="_blank"&gt;http://docs.splunk.com/Documentation/Splunk/6.2.2/Data/Extractfieldsfromfileheadersatindextime&lt;/A&gt;&lt;/P&gt;

&lt;UL&gt;
&lt;LI&gt; If you see some, put the props/transform nullQueue on the &lt;STRONG&gt;forwarder&lt;/STRONG&gt;&lt;/LI&gt;
&lt;LI&gt;If not, then  put the props.conf/transforms.conf  nullQueue on the &lt;STRONG&gt;indexers&lt;/STRONG&gt; and &lt;STRONG&gt;heavy forwarders&lt;/STRONG&gt; (if any)&lt;/LI&gt;
&lt;/UL&gt;</description>
      <pubDate>Mon, 28 Sep 2020 19:40:08 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-is-nullQueue-not-working-with-regex/m-p/154347#M43419</guid>
      <dc:creator>yannK</dc:creator>
      <dc:date>2020-09-28T19:40:08Z</dc:date>
    </item>
    <item>
      <title>Re: Why is nullQueue not working with regex?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-is-nullQueue-not-working-with-regex/m-p/154348#M43420</link>
      <description>&lt;P&gt;Both the props and transforms files are on the heavy forwarders, which is where the pre-parsing is done. Unfortunately the windows DNS logs are not CSV so this will not work. &lt;/P&gt;</description>
      <pubDate>Thu, 23 Apr 2015 16:57:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-is-nullQueue-not-working-with-regex/m-p/154348#M43420</guid>
      <dc:creator>Thomas_Aneiro</dc:creator>
      <dc:date>2015-04-23T16:57:30Z</dc:date>
    </item>
    <item>
      <title>Re: Why is nullQueue not working with regex?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-is-nullQueue-not-working-with-regex/m-p/154349#M43421</link>
      <description>&lt;P&gt;General regex advice: &lt;EM&gt;Never&lt;/EM&gt;  do this for matching:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;^.*something.*$
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;That will blow up your regexprocessor's CPU time, especially for non-matching events, because it'll keep trying to apply the starting &lt;CODE&gt;.*&lt;/CODE&gt;, fail, backtrack, try again, fail, backtrack, ... and you gain nothing, because &lt;CODE&gt;^.*something.*$&lt;/CODE&gt; matches exactly the same stuff as &lt;CODE&gt;something&lt;/CODE&gt;.&lt;BR /&gt;
The only case I know of where it makes sense is if you're extracting/replacing strings and need the bit before the &lt;CODE&gt;something&lt;/CODE&gt; in further processing.&lt;BR /&gt;
Small general advice: Prefix your Splunk regex with &lt;CODE&gt;(?i)&lt;/CODE&gt; to make them case-insensitive so you can write &lt;CODE&gt;...company.com...&lt;/CODE&gt; instead of that mess of character classes.&lt;/P&gt;

&lt;P&gt;You do restart that HF after every change, right?&lt;BR /&gt;
Can you post a sample event?&lt;/P&gt;</description>
      <pubDate>Fri, 24 Apr 2015 02:59:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-is-nullQueue-not-working-with-regex/m-p/154349#M43421</guid>
      <dc:creator>martin_mueller</dc:creator>
      <dc:date>2015-04-24T02:59:37Z</dc:date>
    </item>
    <item>
      <title>Re: Why is nullQueue not working with regex?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-is-nullQueue-not-working-with-regex/m-p/154350#M43422</link>
      <description>&lt;P&gt;The prefix for case-insensitivity is a great idea. I know the regex should be as limited as possible, I just wanted to expand its "reach" to see if it was a regex issue or another issue. I am restarting the splunkd service on the HF, would I have to reboot the actual box itself? Raw events are in pastebin below.&lt;/P&gt;

&lt;P&gt;&lt;A href="http://pastebin(.)com/aVUjhEhZ"&gt;http://pastebin(.)com/aVUjhEhZ&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;Thank you.&lt;/P&gt;</description>
      <pubDate>Fri, 24 Apr 2015 14:22:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-is-nullQueue-not-working-with-regex/m-p/154350#M43422</guid>
      <dc:creator>Thomas_Aneiro</dc:creator>
      <dc:date>2015-04-24T14:22:50Z</dc:date>
    </item>
  </channel>
</rss>

