<?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 What would be the correct regular expression to capture lines that include these messages in my data? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/What-would-be-the-correct-regular-expression-to-capture-lines/m-p/294109#M88797</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;

&lt;P&gt;I'm trying to set up my Splunk instance so that it filters out some lines and then leaves everything else. The lines that I'd like to remove contain one of the following values: &lt;/P&gt;

&lt;UL&gt;
&lt;LI&gt;%ASA-6-302013 &lt;/LI&gt;
&lt;LI&gt;%ASA-6-302014&lt;/LI&gt;
&lt;LI&gt;%ASA-6-302015&lt;/LI&gt;
&lt;LI&gt;%ASA-6-302016&lt;/LI&gt;
&lt;/UL&gt;

&lt;P&gt;To filter out these lines, I added the following sections to my props.conf and transform.conf files&lt;/P&gt;

&lt;P&gt;props.conf&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; [cisco:asa]
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 = %ASA-6-3020(13|14|15|16|20|21)
DEST_KEY = queue
FORMAT = nullQueue 
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;But for some reason, syslog lines containing values other than what was listed above are being removed as well. Is there a change that I should make to my regular expression in order to get things working correctly?&lt;/P&gt;

&lt;P&gt;Thank you&lt;/P&gt;</description>
    <pubDate>Mon, 15 May 2017 18:28:04 GMT</pubDate>
    <dc:creator>lacrosse1991</dc:creator>
    <dc:date>2017-05-15T18:28:04Z</dc:date>
    <item>
      <title>What would be the correct regular expression to capture lines that include these messages in my data?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/What-would-be-the-correct-regular-expression-to-capture-lines/m-p/294109#M88797</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;

&lt;P&gt;I'm trying to set up my Splunk instance so that it filters out some lines and then leaves everything else. The lines that I'd like to remove contain one of the following values: &lt;/P&gt;

&lt;UL&gt;
&lt;LI&gt;%ASA-6-302013 &lt;/LI&gt;
&lt;LI&gt;%ASA-6-302014&lt;/LI&gt;
&lt;LI&gt;%ASA-6-302015&lt;/LI&gt;
&lt;LI&gt;%ASA-6-302016&lt;/LI&gt;
&lt;/UL&gt;

&lt;P&gt;To filter out these lines, I added the following sections to my props.conf and transform.conf files&lt;/P&gt;

&lt;P&gt;props.conf&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; [cisco:asa]
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 = %ASA-6-3020(13|14|15|16|20|21)
DEST_KEY = queue
FORMAT = nullQueue 
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;But for some reason, syslog lines containing values other than what was listed above are being removed as well. Is there a change that I should make to my regular expression in order to get things working correctly?&lt;/P&gt;

&lt;P&gt;Thank you&lt;/P&gt;</description>
      <pubDate>Mon, 15 May 2017 18:28:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/What-would-be-the-correct-regular-expression-to-capture-lines/m-p/294109#M88797</guid>
      <dc:creator>lacrosse1991</dc:creator>
      <dc:date>2017-05-15T18:28:04Z</dc:date>
    </item>
    <item>
      <title>Re: What would be the correct regular expression to capture lines that include these messages in my data?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/What-would-be-the-correct-regular-expression-to-capture-lines/m-p/294110#M88798</link>
      <description>&lt;P&gt;I can't find anything major wrong in your regex. Except may be escape % using  \%&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; REGEX = \%ASA-6-3020(13|14|15|16)
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 15 May 2017 19:25:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/What-would-be-the-correct-regular-expression-to-capture-lines/m-p/294110#M88798</guid>
      <dc:creator>koshyk</dc:creator>
      <dc:date>2017-05-15T19:25:34Z</dc:date>
    </item>
    <item>
      <title>Re: What would be the correct regular expression to capture lines that include these messages in my data?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/What-would-be-the-correct-regular-expression-to-capture-lines/m-p/294111#M88799</link>
      <description>&lt;P&gt;Nothing weird but try adding another rule to your configuration to see what happens.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[cisco:asa]
 TRANSFORMS-null= setnull, not_filtered

[setnull]
REGEX = %ASA-6-3020(13|14|15|16|20|21)
DEST_KEY = queue
FORMAT = nullQueue 

[not_filtered]
REGEX = .
DEST_KEY = queue
FORMAT = indexQueue
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Hope it helps.&lt;/P&gt;</description>
      <pubDate>Mon, 15 May 2017 20:08:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/What-would-be-the-correct-regular-expression-to-capture-lines/m-p/294111#M88799</guid>
      <dc:creator>alemarzu</dc:creator>
      <dc:date>2017-05-15T20:08:00Z</dc:date>
    </item>
    <item>
      <title>Re: What would be the correct regular expression to capture lines that include these messages in my data?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/What-would-be-the-correct-regular-expression-to-capture-lines/m-p/294112#M88800</link>
      <description>&lt;P&gt;a long shot, but is it possible that you have another stanza named setnull in a different transforms.conf that is winning the conflict?  Maybe btool could be a quick check&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;splunk btool transforms list setnull --debug
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 16 May 2017 01:33:18 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/What-would-be-the-correct-regular-expression-to-capture-lines/m-p/294112#M88800</guid>
      <dc:creator>maciep</dc:creator>
      <dc:date>2017-05-16T01:33:18Z</dc:date>
    </item>
    <item>
      <title>Re: What would be the correct regular expression to capture lines that include these messages in my data?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/What-would-be-the-correct-regular-expression-to-capture-lines/m-p/294113#M88801</link>
      <description>&lt;P&gt;Hi lacrosse1991,&lt;/P&gt;

&lt;P&gt;Your config must be applied on the parsing layer, so if there are heavy weight forwarder along the way the &lt;CODE&gt;props.conf&lt;/CODE&gt; and &lt;CODE&gt;transforms.conf&lt;/CODE&gt; must be put on them,. See the docs for details about this &lt;A href="http://docs.splunk.com/Documentation/Splunk/latest/Admin/Configurationparametersandthedatapipeline#Parsing_phase"&gt;http://docs.splunk.com/Documentation/Splunk/latest/Admin/Configurationparametersandthedatapipeline#Parsing_phase&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;Another thing to remember is that you need to restart your Splunk instance after you changed those config files.&lt;/P&gt;

&lt;P&gt;Regarding the regex one thing that will speed it up, is to put the last two digits in a non-capturing group like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;  %ASA-6-3020(?:13|14|15|16|20|21)
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Works faster on regex101.com.&lt;/P&gt;

&lt;P&gt;Hope this helps ...&lt;/P&gt;

&lt;P&gt;cheers, MuS&lt;/P&gt;</description>
      <pubDate>Tue, 16 May 2017 02:52:06 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/What-would-be-the-correct-regular-expression-to-capture-lines/m-p/294113#M88801</guid>
      <dc:creator>MuS</dc:creator>
      <dc:date>2017-05-16T02:52:06Z</dc:date>
    </item>
    <item>
      <title>Re: What would be the correct regular expression to capture lines that include these messages in my data?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/What-would-be-the-correct-regular-expression-to-capture-lines/m-p/294114#M88802</link>
      <description>&lt;P&gt;Thanks for your feedback. What advantage would this type of setup have over what I'm currently using?&lt;/P&gt;</description>
      <pubDate>Tue, 16 May 2017 12:49:18 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/What-would-be-the-correct-regular-expression-to-capture-lines/m-p/294114#M88802</guid>
      <dc:creator>lacrosse1991</dc:creator>
      <dc:date>2017-05-16T12:49:18Z</dc:date>
    </item>
    <item>
      <title>Re: What would be the correct regular expression to capture lines that include these messages in my data?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/What-would-be-the-correct-regular-expression-to-capture-lines/m-p/294115#M88803</link>
      <description>&lt;P&gt;thanks! I'm going to see if this will work&lt;/P&gt;</description>
      <pubDate>Tue, 16 May 2017 12:49:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/What-would-be-the-correct-regular-expression-to-capture-lines/m-p/294115#M88803</guid>
      <dc:creator>lacrosse1991</dc:creator>
      <dc:date>2017-05-16T12:49:44Z</dc:date>
    </item>
    <item>
      <title>Re: What would be the correct regular expression to capture lines that include these messages in my data?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/What-would-be-the-correct-regular-expression-to-capture-lines/m-p/294116#M88804</link>
      <description>&lt;P&gt;Also, only post-deploy, post-restart events will be effected (old events will stay broken).&lt;/P&gt;</description>
      <pubDate>Wed, 17 May 2017 01:51:36 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/What-would-be-the-correct-regular-expression-to-capture-lines/m-p/294116#M88804</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2017-05-17T01:51:36Z</dc:date>
    </item>
    <item>
      <title>Re: What would be the correct regular expression to capture lines that include these messages in my data?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/What-would-be-the-correct-regular-expression-to-capture-lines/m-p/294117#M88805</link>
      <description>&lt;P&gt;sorry about taking so long to respond, but thanks! things seem to be working properly now&lt;/P&gt;</description>
      <pubDate>Tue, 06 Jun 2017 13:20:36 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/What-would-be-the-correct-regular-expression-to-capture-lines/m-p/294117#M88805</guid>
      <dc:creator>lacrosse1991</dc:creator>
      <dc:date>2017-06-06T13:20:36Z</dc:date>
    </item>
  </channel>
</rss>

