<?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: Using multiple OR operators in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Using-multiple-OR-operators/m-p/130469#M26824</link>
    <description>&lt;P&gt;Hello! &lt;BR /&gt;
No, there  is not another way to do it.  And you don't have to put the &lt;STRONG&gt;where&lt;/STRONG&gt; clause. just type your search like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;sourcetype=dhcplogs  (dest!=Prefix1* OR dest!=Prefix2* OR dest!=Prefix3* OR dest!=Prefix4)
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Thanks&lt;/P&gt;</description>
    <pubDate>Thu, 28 May 2015 23:02:39 GMT</pubDate>
    <dc:creator>stephanefotso</dc:creator>
    <dc:date>2015-05-28T23:02:39Z</dc:date>
    <item>
      <title>Using multiple OR operators</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Using-multiple-OR-operators/m-p/130468#M26823</link>
      <description>&lt;P&gt;Hi guys&lt;/P&gt;

&lt;P&gt;Im doing a correlation search where Im looking for hostnames and filtering for events I dont want. eg.&lt;/P&gt;

&lt;P&gt;sourcetype=dhcplogs where dest!=Prefix1* OR dest!=Prefix2* OR dest!=Prefix3* OR dest!=Prefix4* .....&lt;/P&gt;

&lt;P&gt;Is there a more efficient way of grouping multiple OR operators together? Would this help with search processing, or just tidier to read.&lt;/P&gt;

&lt;P&gt;Cheers&lt;/P&gt;</description>
      <pubDate>Thu, 28 May 2015 22:50:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Using-multiple-OR-operators/m-p/130468#M26823</guid>
      <dc:creator>shiftey</dc:creator>
      <dc:date>2015-05-28T22:50:50Z</dc:date>
    </item>
    <item>
      <title>Re: Using multiple OR operators</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Using-multiple-OR-operators/m-p/130469#M26824</link>
      <description>&lt;P&gt;Hello! &lt;BR /&gt;
No, there  is not another way to do it.  And you don't have to put the &lt;STRONG&gt;where&lt;/STRONG&gt; clause. just type your search like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;sourcetype=dhcplogs  (dest!=Prefix1* OR dest!=Prefix2* OR dest!=Prefix3* OR dest!=Prefix4)
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Thu, 28 May 2015 23:02:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Using-multiple-OR-operators/m-p/130469#M26824</guid>
      <dc:creator>stephanefotso</dc:creator>
      <dc:date>2015-05-28T23:02:39Z</dc:date>
    </item>
    <item>
      <title>Re: Using multiple OR operators</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Using-multiple-OR-operators/m-p/130470#M26825</link>
      <description>&lt;P&gt;Thanks stephanefotso,&lt;/P&gt;

&lt;P&gt;I'm using this in a new correlation search using guided mode. Im at the filter stage of the search creation wizard and have put:&lt;/P&gt;

&lt;P&gt;dest!=Prefix1* OR dest!=Prefix2*&lt;/P&gt;

&lt;P&gt;yet there is an error below that says&lt;BR /&gt;
" ! Search does not parse"&lt;/P&gt;

&lt;P&gt;I've used the network sessions datamodel and specified the search time.&lt;/P&gt;

&lt;P&gt;How would I know what "Application Context" to use for each correlation search?&lt;/P&gt;

&lt;P&gt;Thanks for your help&lt;/P&gt;</description>
      <pubDate>Thu, 28 May 2015 23:23:56 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Using-multiple-OR-operators/m-p/130470#M26825</guid>
      <dc:creator>shiftey</dc:creator>
      <dc:date>2015-05-28T23:23:56Z</dc:date>
    </item>
    <item>
      <title>Re: Using multiple OR operators</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Using-multiple-OR-operators/m-p/130471#M26826</link>
      <description>&lt;P&gt;I also specified DHCP as part of the network session data model..&lt;/P&gt;</description>
      <pubDate>Thu, 28 May 2015 23:24:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Using-multiple-OR-operators/m-p/130471#M26826</guid>
      <dc:creator>shiftey</dc:creator>
      <dc:date>2015-05-28T23:24:37Z</dc:date>
    </item>
    <item>
      <title>Re: Using multiple OR operators</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Using-multiple-OR-operators/m-p/130472#M26827</link>
      <description>&lt;P&gt;If you are at the filter stage, i thing, you must use the where clause. But the problem is that, the star(&lt;EM&gt;) can not works with the where clause. Means `|where dest!=Prefix1&lt;/EM&gt; `is an error.&lt;/P&gt;</description>
      <pubDate>Fri, 29 May 2015 00:04:08 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Using-multiple-OR-operators/m-p/130472#M26827</guid>
      <dc:creator>stephanefotso</dc:creator>
      <dc:date>2015-05-29T00:04:08Z</dc:date>
    </item>
    <item>
      <title>Re: Using multiple OR operators</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Using-multiple-OR-operators/m-p/130473#M26828</link>
      <description>&lt;P&gt;try:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;  ...|replace Prefix1* with Prefix1 in dest|replace Prefix2* with Prefix2 in dest|where dest!=Prefix1 OR dest!=Prefix2
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 29 May 2015 00:21:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Using-multiple-OR-operators/m-p/130473#M26828</guid>
      <dc:creator>stephanefotso</dc:creator>
      <dc:date>2015-05-29T00:21:00Z</dc:date>
    </item>
    <item>
      <title>Re: Using multiple OR operators</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Using-multiple-OR-operators/m-p/130474#M26829</link>
      <description>&lt;P&gt;Ive also tried &lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;replace prefix1* with prefix1 in dest| replace prefix2* with prefix* in dest | where dest!=prefix1 OR dest!=prefix2&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;however that has 0 results. Im thinking Splunk is not treating prefix1* as a wildcard but a string?&lt;/P&gt;

&lt;P&gt;Any more advice is most welcome.&lt;/P&gt;

&lt;P&gt;Cheers&lt;/P&gt;</description>
      <pubDate>Fri, 29 May 2015 02:32:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Using-multiple-OR-operators/m-p/130474#M26829</guid>
      <dc:creator>shiftey</dc:creator>
      <dc:date>2015-05-29T02:32:07Z</dc:date>
    </item>
    <item>
      <title>Re: Using multiple OR operators</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Using-multiple-OR-operators/m-p/130475#M26830</link>
      <description>&lt;P&gt;No. There was an error in my query. That is what to write.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;replace prefix1* with prefix1 in dest| replace prefix2* with prefix2 in dest | where dest!=prefix1 OR dest!=prefix2
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;And, If prefix1* is a string in your events, means, you are not trying to match any caracter,  just write&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;...| where dest!="prefix1*" OR dest!="prefix2*"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Fri, 29 May 2015 07:10:51 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Using-multiple-OR-operators/m-p/130475#M26830</guid>
      <dc:creator>stephanefotso</dc:creator>
      <dc:date>2015-05-29T07:10:51Z</dc:date>
    </item>
    <item>
      <title>Re: Using multiple OR operators</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Using-multiple-OR-operators/m-p/130476#M26831</link>
      <description>&lt;P&gt;This test will ALWAYS be true...&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;dest!=Prefix1* OR dest!=Prefix2* 
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;...because...&lt;BR /&gt;
Prefix1PlusSomeStuff is not equal to Prefix2*, so it meets the second criteria.&lt;BR /&gt;&lt;BR /&gt;
Prefix2PlusSomeStuff is not equal to Prefix1*, so it meets the first criteria.  &lt;/P&gt;

&lt;P&gt;...so, that should be coded in either of the following ways...&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; NOT ( dest=Prefix1* OR dest=Prefix2*)
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;...or...&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; (dest!=Prefix1* AND dest!=Prefix2*)
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 29 Sep 2020 13:48:53 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Using-multiple-OR-operators/m-p/130476#M26831</guid>
      <dc:creator>DalJeanis</dc:creator>
      <dc:date>2020-09-29T13:48:53Z</dc:date>
    </item>
    <item>
      <title>Re: Using multiple OR operators</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Using-multiple-OR-operators/m-p/130477#M26832</link>
      <description>&lt;P&gt;Wish Granted!!!  In Splunk 6.6 -&lt;/P&gt;

&lt;P&gt;&lt;A href="http://docs.splunk.com/Documentation/SplunkCloud/6.6.0/SearchReference/Search#Multiple_field-value_comparisons_with_the_IN_operator"&gt;Search command supports IN operator&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;sourcetype=xyz status IN (100, 102, 103)&lt;/P&gt;

&lt;P&gt;&lt;A href="http://docs.splunk.com/Documentation/SplunkCloud/6.6.0/SearchReference/ConditionalFunctions#Description_6"&gt;Eval and where commands support in function&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;| where in(status,"222","333","444","555")&lt;/P&gt;</description>
      <pubDate>Mon, 19 Jun 2017 20:30:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Using-multiple-OR-operators/m-p/130477#M26832</guid>
      <dc:creator>lguinn2</dc:creator>
      <dc:date>2017-06-19T20:30:54Z</dc:date>
    </item>
  </channel>
</rss>

