<?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 to use regex to filter out logs? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-use-regex-to-filter-out-logs/m-p/558129#M158522</link>
    <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/225168"&gt;@ITWhisperer&lt;/a&gt;&amp;nbsp;that's right: the first one should be excluded with nullQueue and the second one should be indexed.&lt;/P&gt;&lt;P&gt;The problem though is that all logs are excluded.&lt;/P&gt;</description>
    <pubDate>Tue, 06 Jul 2021 15:50:23 GMT</pubDate>
    <dc:creator>martaBenedetti</dc:creator>
    <dc:date>2021-07-06T15:50:23Z</dc:date>
    <item>
      <title>How to use regex to filter out logs?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-use-regex-to-filter-out-logs/m-p/558124#M158519</link>
      <description>&lt;P&gt;Hi community,&lt;/P&gt;&lt;P&gt;I have the need to exclude AIX logs containing a certain field value.&lt;/P&gt;&lt;P&gt;This is the regex the parser is using to extract vendor_action filed:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;^\w+\s+\w+\s+\d+\s+\d+\:\d+\:\d+\s+\d+\s+(?&amp;lt;pid&amp;gt;\d+)\s+(?&amp;lt;ppid&amp;gt;\d+)\s+(?&amp;lt;user&amp;gt;\S+)\s+(?&amp;lt;process&amp;gt;\S+)\s+(?&amp;lt;vendor_action&amp;gt;\S+)\s+(?&amp;lt;status&amp;gt;\S+)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm trying to exclude events that contain vedor_action=FILE_Unlink and these are my conf file located on Heavy Forwarder:&lt;/P&gt;&lt;P&gt;props.conf&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;[aix:audit]
TRANSFORMS-null= setnull&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;transforms.conf&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;[setnull]
REGEX    = ^\w+\s+\w+\s+\d+\s+\d+\:\d+\:\d+\s+\d+\s+\d+\s+\d+\s+\S+\s+\S+\s+FILE_Unlink\s+\S+
DEST_KEY = queue
FORMAT   = nullQueue&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;There are sample logs: the first one should be excluded while the second one no:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Fri Jul 02 10:01:49 2021 34078844 8520050  dbloader rm                              FILE_Unlink     OK          Not supported                   
        filename /tmp/CSI_ODS_M_SIA__INFO_RILANCIO.txt

Fri Jul 02 10:01:46 2021 34930828 4587668  root     root     lsvg                            FILE_Unlink     OK          
        filename /dev/__pv17.0.34930828&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When I restart spunk all logs are excluded, so I think something is wrong with my REGEX even if on regex101 seems to work fine.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any ideas?&lt;/P&gt;&lt;P&gt;Thanks a lot&lt;/P&gt;&lt;P&gt;Marta&lt;/P&gt;</description>
      <pubDate>Fri, 02 Jul 2021 08:21:45 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-use-regex-to-filter-out-logs/m-p/558124#M158519</guid>
      <dc:creator>martaBenedetti</dc:creator>
      <dc:date>2021-07-02T08:21:45Z</dc:date>
    </item>
    <item>
      <title>Re: How to use regex to filter out logs?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-use-regex-to-filter-out-logs/m-p/558128#M158521</link>
      <description>&lt;P&gt;The first one has 2 words between the numbers and FILE_Unlink whereas the second one has 3 words - your regex only caters for the first case&lt;/P&gt;</description>
      <pubDate>Fri, 02 Jul 2021 09:17:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-use-regex-to-filter-out-logs/m-p/558128#M158521</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2021-07-02T09:17:40Z</dc:date>
    </item>
    <item>
      <title>Re: How to use regex to filter out logs?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-use-regex-to-filter-out-logs/m-p/558129#M158522</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/225168"&gt;@ITWhisperer&lt;/a&gt;&amp;nbsp;that's right: the first one should be excluded with nullQueue and the second one should be indexed.&lt;/P&gt;&lt;P&gt;The problem though is that all logs are excluded.&lt;/P&gt;</description>
      <pubDate>Tue, 06 Jul 2021 15:50:23 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-use-regex-to-filter-out-logs/m-p/558129#M158522</guid>
      <dc:creator>martaBenedetti</dc:creator>
      <dc:date>2021-07-06T15:50:23Z</dc:date>
    </item>
    <item>
      <title>Re: How to use regex to filter out logs?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-use-regex-to-filter-out-logs/m-p/558443#M158634</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/225168"&gt;@ITWhisperer&lt;/a&gt;&amp;nbsp;Do you have suggestion on how to do so?&lt;/P&gt;&lt;P&gt;That is filter out the first kind of log?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Tue, 06 Jul 2021 15:49:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-use-regex-to-filter-out-logs/m-p/558443#M158634</guid>
      <dc:creator>martaBenedetti</dc:creator>
      <dc:date>2021-07-06T15:49:17Z</dc:date>
    </item>
    <item>
      <title>Re: How to use regex to filter out logs?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-use-regex-to-filter-out-logs/m-p/558449#M158638</link>
      <description>&lt;P&gt;I can't anything wrong with what you have posted. Which version of splunk are you using?&lt;/P&gt;</description>
      <pubDate>Tue, 06 Jul 2021 16:17:33 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-use-regex-to-filter-out-logs/m-p/558449#M158638</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2021-07-06T16:17:33Z</dc:date>
    </item>
    <item>
      <title>Re: How to use regex to filter out logs?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-use-regex-to-filter-out-logs/m-p/558510#M158653</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/225168"&gt;@ITWhisperer&lt;/a&gt;&amp;nbsp;on HFW there is Splunk Enterprise 7.1.3.&lt;/P&gt;&lt;P&gt;Thought you were thinking about something &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Thanks anyway!!&lt;/P&gt;</description>
      <pubDate>Wed, 07 Jul 2021 07:25:15 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-use-regex-to-filter-out-logs/m-p/558510#M158653</guid>
      <dc:creator>martaBenedetti</dc:creator>
      <dc:date>2021-07-07T07:25:15Z</dc:date>
    </item>
  </channel>
</rss>

