<?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 Splunk - excluding fields which contain certain values in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Splunk-excluding-fields-which-contain-certain-values/m-p/456493#M170509</link>
    <description>&lt;P&gt;I want to exclude events within my search which have a field (Message) which may contain certain values; &lt;BR /&gt;
so my Search is currently :&lt;BR /&gt;
index=a OR index=b SourceName=a OR sourcetype =a &lt;EM&gt;ERROR&lt;/EM&gt; OR &lt;EM&gt;FAIL&lt;/EM&gt; OR &lt;EM&gt;FAILED&lt;/EM&gt; OR &lt;EM&gt;FAILURE&lt;/EM&gt;&lt;BR /&gt;
| where NOT (Action="Fail.") AND NOT (Message=&lt;EM&gt;getservbyname&lt;/EM&gt;) AND NOT (Message=&lt;EM&gt;UDP&lt;/EM&gt;)&lt;/P&gt;

&lt;P&gt;The above doesnt work obviously, but the first bit (Action="Fail.") exclusion works OK on its own; so I'm looking for the syntax which will make the Message field includes values 'getservbyname' OR 'UDP' exclusions work too. The "Message" field is a long text field hence trying to filter these out using Key Values getservbyname and UDP.&lt;/P&gt;

&lt;P&gt;Many Thanks for any assistance!&lt;/P&gt;</description>
    <pubDate>Thu, 04 Jul 2019 11:25:54 GMT</pubDate>
    <dc:creator>nickhaj</dc:creator>
    <dc:date>2019-07-04T11:25:54Z</dc:date>
    <item>
      <title>Splunk - excluding fields which contain certain values</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Splunk-excluding-fields-which-contain-certain-values/m-p/456493#M170509</link>
      <description>&lt;P&gt;I want to exclude events within my search which have a field (Message) which may contain certain values; &lt;BR /&gt;
so my Search is currently :&lt;BR /&gt;
index=a OR index=b SourceName=a OR sourcetype =a &lt;EM&gt;ERROR&lt;/EM&gt; OR &lt;EM&gt;FAIL&lt;/EM&gt; OR &lt;EM&gt;FAILED&lt;/EM&gt; OR &lt;EM&gt;FAILURE&lt;/EM&gt;&lt;BR /&gt;
| where NOT (Action="Fail.") AND NOT (Message=&lt;EM&gt;getservbyname&lt;/EM&gt;) AND NOT (Message=&lt;EM&gt;UDP&lt;/EM&gt;)&lt;/P&gt;

&lt;P&gt;The above doesnt work obviously, but the first bit (Action="Fail.") exclusion works OK on its own; so I'm looking for the syntax which will make the Message field includes values 'getservbyname' OR 'UDP' exclusions work too. The "Message" field is a long text field hence trying to filter these out using Key Values getservbyname and UDP.&lt;/P&gt;

&lt;P&gt;Many Thanks for any assistance!&lt;/P&gt;</description>
      <pubDate>Thu, 04 Jul 2019 11:25:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Splunk-excluding-fields-which-contain-certain-values/m-p/456493#M170509</guid>
      <dc:creator>nickhaj</dc:creator>
      <dc:date>2019-07-04T11:25:54Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk - excluding fields which contain certain values</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Splunk-excluding-fields-which-contain-certain-values/m-p/456494#M170510</link>
      <description>&lt;P&gt;try:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;(index=a OR index=b) (SourceName=a OR sourcetype =a) (ERROR OR FAIL OR FAILED OR FAILURE) Action!="FAIL." Message!=*getservbyname* Message!=*UDP*
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Note: I just added those parentheses to make it a little easier to read, those are not necessary.&lt;BR /&gt;
Note2: this will only show results that do have some value in Action and Message field. If you also want to include events where those fields are empty, then use &lt;CODE&gt;NOT Action="Fail." NOT Message=*getservbyname* NOT Message=*UDP*&lt;/CODE&gt; instead of the &lt;CODE&gt;!=&lt;/CODE&gt; operator.&lt;/P&gt;</description>
      <pubDate>Thu, 04 Jul 2019 12:16:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Splunk-excluding-fields-which-contain-certain-values/m-p/456494#M170510</guid>
      <dc:creator>FrankVl</dc:creator>
      <dc:date>2019-07-04T12:16:43Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk - excluding fields which contain certain values</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Splunk-excluding-fields-which-contain-certain-values/m-p/456495#M170511</link>
      <description>&lt;P&gt;HI - that seems to have done the trick !!! MANY Thanks for your input !&lt;/P&gt;</description>
      <pubDate>Thu, 04 Jul 2019 13:38:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Splunk-excluding-fields-which-contain-certain-values/m-p/456495#M170511</guid>
      <dc:creator>nickhaj</dc:creator>
      <dc:date>2019-07-04T13:38:26Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk - excluding fields which contain certain values</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Splunk-excluding-fields-which-contain-certain-values/m-p/456496#M170512</link>
      <description>&lt;P&gt;Assuming that comment belongs to my answer: you're welcome. Please mark the answer as accepted, so it is clear your question has been answered &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 04 Jul 2019 13:58:28 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Splunk-excluding-fields-which-contain-certain-values/m-p/456496#M170512</guid>
      <dc:creator>FrankVl</dc:creator>
      <dc:date>2019-07-04T13:58:28Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk - excluding fields which contain certain values</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Splunk-excluding-fields-which-contain-certain-values/m-p/456497#M170513</link>
      <description>&lt;P&gt;I did some tests adding one of the NOT statements at a time and the amount of events returned reduced accordingly each time, so i'm 99.99% sure the revisions suggested are doing the job.....but will monitor over the next week to be 100% certain &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 04 Jul 2019 14:22:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Splunk-excluding-fields-which-contain-certain-values/m-p/456497#M170513</guid>
      <dc:creator>nickhaj</dc:creator>
      <dc:date>2019-07-04T14:22:02Z</dc:date>
    </item>
  </channel>
</rss>

