<?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 get events that do not contain a particular string or a pattern? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-get-events-that-do-not-contain-a-particular-string-or-a/m-p/392700#M114241</link>
    <description>&lt;P&gt;For us to assist you better you will have to provide concrete distinction between events to be selected and that to be filtered.Following seems to be present on all the events (whether you need them or not): &lt;CODE&gt;"action:debug message can be exception : "&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;So, we can not provide you exact filter as the samples you have provided have some generic messages after the matched pattern. Regular expression/Filter Criteria has to be based on these messages only so generic message will not be useful for us to assist.&lt;/P&gt;

&lt;P&gt;You can definitely look for @DalJeanis 's approach of using &lt;CODE&gt;NOT&lt;/CODE&gt; or &lt;CODE&gt;!=&lt;/CODE&gt; depending on your use case.&lt;/P&gt;</description>
    <pubDate>Sun, 05 Aug 2018 04:43:41 GMT</pubDate>
    <dc:creator>niketn</dc:creator>
    <dc:date>2018-08-05T04:43:41Z</dc:date>
    <item>
      <title>How to get events that do not contain a particular string or a pattern?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-get-events-that-do-not-contain-a-particular-string-or-a/m-p/392696#M114237</link>
      <description>&lt;P&gt;I have events coming in the below format&lt;BR /&gt;
"2018:04:04:11:19:59.926 testhostname 3:INFO TEST:NOTE FLAG 1234567894567890 praimaryflag:secondflag:action:debug message can be exception : There was a this ERROR occured "&lt;/P&gt;

&lt;P&gt;and there are events that have different messages too such as :&lt;/P&gt;

&lt;P&gt;2018:04:04:11:19:59.926 testhostname 3:INFO TEST:NOTE FLAG 1234567891267895 praimaryflag:secondflag:action:debug message can be exception : There was something else&lt;BR /&gt;
2018:04:04:11:19:59.926 testhostname 3:INFO TEST:NOTE FLAG 12345686794567891 praimaryflag:secondflag:action:debug message can be exception : Just a debug log no worries&lt;BR /&gt;
2018:04:04:11:19:59.926 testhostname 3:INFO TEST:NOTE FLAG 1234567894567819 praimaryflag:secondflag:action:debug message can be exception : There was a different ERROR&lt;/P&gt;

&lt;P&gt;I want to extract all events that do not contain &lt;/P&gt;

&lt;P&gt;Case 1.  " debug message can be exception : There was a this ERROR occured"&lt;BR /&gt;
Case 2.  " There was a this ERROR occured"&lt;/P&gt;

&lt;P&gt;Need help getting the right search query or rex for this. &lt;/P&gt;</description>
      <pubDate>Sat, 04 Aug 2018 17:45:15 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-get-events-that-do-not-contain-a-particular-string-or-a/m-p/392696#M114237</guid>
      <dc:creator>bkumarm</dc:creator>
      <dc:date>2018-08-04T17:45:15Z</dc:date>
    </item>
    <item>
      <title>Re: How to get events that do not contain a particular string or a pattern?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-get-events-that-do-not-contain-a-particular-string-or-a/m-p/392697#M114238</link>
      <description>&lt;P&gt;@bkumar, if you know the pattern of data to be excluded and not sure of pattern of data to be included, you can create regex based re-routing of unwanted data to a different sourcetype so that only required events are indexed with existing sourcetype. Refer to the Splunk Documentation for sourcetype re-routing: &lt;A href="http://docs.splunk.com/Documentation/Splunk/latest/Forwarding/Routeandfilterdatad#Filter_and_route_event_data_to_target_groups"&gt;http://docs.splunk.com/Documentation/Splunk/latest/Forwarding/Routeandfilterdatad#Filter_and_route_event_data_to_target_groups&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 04 Aug 2018 18:15:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-get-events-that-do-not-contain-a-particular-string-or-a/m-p/392697#M114238</guid>
      <dc:creator>niketn</dc:creator>
      <dc:date>2018-08-04T18:15:00Z</dc:date>
    </item>
    <item>
      <title>Re: How to get events that do not contain a particular string or a pattern?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-get-events-that-do-not-contain-a-particular-string-or-a/m-p/392698#M114239</link>
      <description>&lt;P&gt;SInce every record that matches the second also matches the first, your REGEX is very simple &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;"There was a this ERROR occured"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;This line as the first line after the initial search will eliminate all the matches...&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| regex _raw!="There was a this ERROR occured"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;HR /&gt;

&lt;P&gt;If there was a specific other wording where "a this" is in that message, then you need to give us the exact wording. &lt;/P&gt;</description>
      <pubDate>Sat, 04 Aug 2018 18:18:06 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-get-events-that-do-not-contain-a-particular-string-or-a/m-p/392698#M114239</guid>
      <dc:creator>DalJeanis</dc:creator>
      <dc:date>2018-08-04T18:18:06Z</dc:date>
    </item>
    <item>
      <title>Re: How to get events that do not contain a particular string or a pattern?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-get-events-that-do-not-contain-a-particular-string-or-a/m-p/392699#M114240</link>
      <description>&lt;P&gt;@niketnilay , in the current case, I do not have access to backend to configure transforms. I have been provided access to an index that has these events . I need to use regex or search to filter/extract required fields. &lt;/P&gt;</description>
      <pubDate>Sun, 05 Aug 2018 04:14:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-get-events-that-do-not-contain-a-particular-string-or-a/m-p/392699#M114240</guid>
      <dc:creator>bkumarm</dc:creator>
      <dc:date>2018-08-05T04:14:07Z</dc:date>
    </item>
    <item>
      <title>Re: How to get events that do not contain a particular string or a pattern?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-get-events-that-do-not-contain-a-particular-string-or-a/m-p/392700#M114241</link>
      <description>&lt;P&gt;For us to assist you better you will have to provide concrete distinction between events to be selected and that to be filtered.Following seems to be present on all the events (whether you need them or not): &lt;CODE&gt;"action:debug message can be exception : "&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;So, we can not provide you exact filter as the samples you have provided have some generic messages after the matched pattern. Regular expression/Filter Criteria has to be based on these messages only so generic message will not be useful for us to assist.&lt;/P&gt;

&lt;P&gt;You can definitely look for @DalJeanis 's approach of using &lt;CODE&gt;NOT&lt;/CODE&gt; or &lt;CODE&gt;!=&lt;/CODE&gt; depending on your use case.&lt;/P&gt;</description>
      <pubDate>Sun, 05 Aug 2018 04:43:41 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-get-events-that-do-not-contain-a-particular-string-or-a/m-p/392700#M114241</guid>
      <dc:creator>niketn</dc:creator>
      <dc:date>2018-08-05T04:43:41Z</dc:date>
    </item>
    <item>
      <title>Re: How to get events that do not contain a particular string or a pattern?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-get-events-that-do-not-contain-a-particular-string-or-a/m-p/392701#M114242</link>
      <description>&lt;P&gt;The first part does not matter, I want to filter all events that contain&lt;BR /&gt;
" There was a this ERROR occurred" .&lt;BR /&gt;
 I did try @DalJeanis approach, couldn't get a complete solution though.&lt;/P&gt;</description>
      <pubDate>Sun, 05 Aug 2018 11:23:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-get-events-that-do-not-contain-a-particular-string-or-a/m-p/392701#M114242</guid>
      <dc:creator>bkumarm</dc:creator>
      <dc:date>2018-08-05T11:23:48Z</dc:date>
    </item>
    <item>
      <title>Re: How to get events that do not contain a particular string or a pattern?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-get-events-that-do-not-contain-a-particular-string-or-a/m-p/392702#M114243</link>
      <description>&lt;P&gt;So what was the exact thing that didn't work in Dal's approach?&lt;/P&gt;</description>
      <pubDate>Sun, 05 Aug 2018 12:30:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-get-events-that-do-not-contain-a-particular-string-or-a/m-p/392702#M114243</guid>
      <dc:creator>cpetterborg</dc:creator>
      <dc:date>2018-08-05T12:30:17Z</dc:date>
    </item>
    <item>
      <title>Re: How to get events that do not contain a particular string or a pattern?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-get-events-that-do-not-contain-a-particular-string-or-a/m-p/392703#M114244</link>
      <description>&lt;P&gt;@DalJeanis what I need is to filter all events that DO NOT have the string "There was a this ERROR occured "  exact match. And then I will need to extract fields from those events  to generate reports.&lt;/P&gt;</description>
      <pubDate>Sun, 05 Aug 2018 15:48:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-get-events-that-do-not-contain-a-particular-string-or-a/m-p/392703#M114244</guid>
      <dc:creator>bkumarm</dc:creator>
      <dc:date>2018-08-05T15:48:48Z</dc:date>
    </item>
    <item>
      <title>Re: How to get events that do not contain a particular string or a pattern?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-get-events-that-do-not-contain-a-particular-string-or-a/m-p/392704#M114245</link>
      <description>&lt;P&gt;Finally I got this working.  Figured out that the solution did not work earlier because of a line breaking issue at transforms.&lt;BR /&gt;
Thanks for all your time.&lt;BR /&gt;
I am accepting this answer&lt;/P&gt;</description>
      <pubDate>Sun, 05 Aug 2018 16:13:12 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-get-events-that-do-not-contain-a-particular-string-or-a/m-p/392704#M114245</guid>
      <dc:creator>bkumarm</dc:creator>
      <dc:date>2018-08-05T16:13:12Z</dc:date>
    </item>
    <item>
      <title>Re: How to get events that do not contain a particular string or a pattern?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-get-events-that-do-not-contain-a-particular-string-or-a/m-p/392705#M114246</link>
      <description>&lt;P&gt;already answered ... it was a small fix that was required in transforms&lt;/P&gt;</description>
      <pubDate>Sun, 05 Aug 2018 16:14:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-get-events-that-do-not-contain-a-particular-string-or-a/m-p/392705#M114246</guid>
      <dc:creator>bkumarm</dc:creator>
      <dc:date>2018-08-05T16:14:00Z</dc:date>
    </item>
  </channel>
</rss>

