<?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 NOT operator issue in Splunk Dev</title>
    <link>https://community.splunk.com/t5/Splunk-Dev/NOT-operator-issue/m-p/40375#M490</link>
    <description>&lt;P&gt;I'm having trouble applying a filter to group servers which share the scp keyword, into %scp% and %dscp% subgroups. The resulting AND expression does not return any values.&lt;BR /&gt;
How should I rewrite the NOT sentence ?&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;case(
NOT (hostname like "%dscp%") AND hostname like "%scp%", "SCPs", 
....
hostname like "%dscp%", "DSCPs",
hostname like "%mgr%", "MGRs"
), 
"other")
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;EDIT: Also tried the variation&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;NOT like(HOST_NAME,"%dscp%") AND like(HOST_NAME,"%scp%"), "SCPs", 
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;with no luck.&lt;/P&gt;</description>
    <pubDate>Fri, 22 Feb 2013 10:40:12 GMT</pubDate>
    <dc:creator>splunk_zen</dc:creator>
    <dc:date>2013-02-22T10:40:12Z</dc:date>
    <item>
      <title>NOT operator issue</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/NOT-operator-issue/m-p/40375#M490</link>
      <description>&lt;P&gt;I'm having trouble applying a filter to group servers which share the scp keyword, into %scp% and %dscp% subgroups. The resulting AND expression does not return any values.&lt;BR /&gt;
How should I rewrite the NOT sentence ?&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;case(
NOT (hostname like "%dscp%") AND hostname like "%scp%", "SCPs", 
....
hostname like "%dscp%", "DSCPs",
hostname like "%mgr%", "MGRs"
), 
"other")
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;EDIT: Also tried the variation&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;NOT like(HOST_NAME,"%dscp%") AND like(HOST_NAME,"%scp%"), "SCPs", 
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;with no luck.&lt;/P&gt;</description>
      <pubDate>Fri, 22 Feb 2013 10:40:12 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/NOT-operator-issue/m-p/40375#M490</guid>
      <dc:creator>splunk_zen</dc:creator>
      <dc:date>2013-02-22T10:40:12Z</dc:date>
    </item>
    <item>
      <title>Re: NOT operator issue</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/NOT-operator-issue/m-p/40376#M491</link>
      <description>&lt;PRE&gt;&lt;CODE&gt;host=*scp* AND host!=*dscp*
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;or&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;host=*scp* NOT host=*dscp*
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 22 Feb 2013 11:40:22 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/NOT-operator-issue/m-p/40376#M491</guid>
      <dc:creator>jonuwz</dc:creator>
      <dc:date>2013-02-22T11:40:22Z</dc:date>
    </item>
    <item>
      <title>Re: NOT operator issue</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/NOT-operator-issue/m-p/40377#M492</link>
      <description>&lt;P&gt;Thanks jonuwz, &lt;BR /&gt;
but it seems case does not play well with that wildcard form:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;Error in 'eval' command: The expression is malformed. An unexpected character is reached at '*scp* AND hostname !=*dscp*, "SCPs", hostname =*dscp*, "DSCPs"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;If I encapsulate the wildcards with quotes,&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;hostnam == "*scp*" AND host!="*dscp*"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;it just does not find anything as it explicitly searches for the string "&lt;EM&gt;scp&lt;/EM&gt;" ('*' characters included)&lt;/P&gt;</description>
      <pubDate>Fri, 22 Feb 2013 15:17:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/NOT-operator-issue/m-p/40377#M492</guid>
      <dc:creator>splunk_zen</dc:creator>
      <dc:date>2013-02-22T15:17:42Z</dc:date>
    </item>
    <item>
      <title>Re: NOT operator issue</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/NOT-operator-issue/m-p/40378#M493</link>
      <description>&lt;P&gt;Sigh...&lt;BR /&gt;
Some admin please delete this question.&lt;BR /&gt;
The initial search was correct.&lt;BR /&gt;
Turns out some collection process had stopped and that range of hosts were not being updated, that's why I was seeing any results, there weren't any to show..&lt;/P&gt;</description>
      <pubDate>Fri, 22 Feb 2013 16:45:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/NOT-operator-issue/m-p/40378#M493</guid>
      <dc:creator>splunk_zen</dc:creator>
      <dc:date>2013-02-22T16:45:30Z</dc:date>
    </item>
  </channel>
</rss>

