<?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: Remove multiple values of attributes using single NOT in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Remove-multiple-values-of-attributes-using-single-NOT/m-p/350533#M103776</link>
    <description>&lt;P&gt;For small list, you can use following subsearch method. Provide space separated list of IP in the subsearch eval command.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=foo sourcetype=bar [| gentimes start=-1 | eval IP="xxx.xx.xx.xx yyy.yy.yy.yy zzz.zz.zz.zz"  | table IP | makemv IP  ] ..| rest of the search
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Fri, 10 Mar 2017 15:32:56 GMT</pubDate>
    <dc:creator>somesoni2</dc:creator>
    <dc:date>2017-03-10T15:32:56Z</dc:date>
    <item>
      <title>Remove multiple values of attributes using single NOT</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Remove-multiple-values-of-attributes-using-single-NOT/m-p/350530#M103773</link>
      <description>&lt;P&gt;Hello Everyone,&lt;/P&gt;

&lt;P&gt;I want to block multiple IP address I got my using IP!=xxx.xx.xx.xx OR IP!=yyy.yy.yy.yy&lt;/P&gt;

&lt;P&gt;Is there any way to block all using single NOT command or any other like example IP NOT IN (xxx.xx.xx.xx OR yyy.yy.yy.yy)&lt;/P&gt;

&lt;P&gt;Thanks in advance!&lt;/P&gt;

&lt;P&gt;VK&lt;/P&gt;</description>
      <pubDate>Fri, 10 Mar 2017 10:48:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Remove-multiple-values-of-attributes-using-single-NOT/m-p/350530#M103773</guid>
      <dc:creator>vittal_kumar</dc:creator>
      <dc:date>2017-03-10T10:48:42Z</dc:date>
    </item>
    <item>
      <title>Re: Remove multiple values of attributes using single NOT</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Remove-multiple-values-of-attributes-using-single-NOT/m-p/350531#M103774</link>
      <description>&lt;P&gt;Hi vittal_kumar,&lt;BR /&gt;
you could use eval commands with match or like, but it's slow!&lt;BR /&gt;
the best way is to insert all your IPs in a lookup or tag them in an eventtype.&lt;/P&gt;

&lt;P&gt;Bye.&lt;BR /&gt;
Giuseppe&lt;/P&gt;</description>
      <pubDate>Fri, 10 Mar 2017 12:11:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Remove-multiple-values-of-attributes-using-single-NOT/m-p/350531#M103774</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2017-03-10T12:11:50Z</dc:date>
    </item>
    <item>
      <title>Re: Remove multiple values of attributes using single NOT</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Remove-multiple-values-of-attributes-using-single-NOT/m-p/350532#M103775</link>
      <description>&lt;P&gt;Well, you can do something similar to what you wrote:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;... NOT (IP=X OR IP=Y)
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Splunk also understands CIDR notation in many cases, so if they're all 192.168.3.0/24 addresses, you can do that:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;... NOT (IP=192.168.0.0/24)
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Or you could put them in a lookup and remove them using a subsearch:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;... NOT [ | inputlookup &amp;lt;your lookup&amp;gt; ]
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;That last will take a bit of work to get going, but may ultimately be the better way to manage this if it's a sizeable list.  See perhaps &lt;A href="https://answers.splunk.com/answers/209626/how-best-to-use-inputlookup-command-in-subsearch.html"&gt;this discussion&lt;/A&gt;.  There are lots more where that came from and if you want to go down that route ask!&lt;/P&gt;

&lt;P&gt;Happy Splunking!&lt;BR /&gt;
-Rich&lt;/P&gt;</description>
      <pubDate>Fri, 10 Mar 2017 12:22:15 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Remove-multiple-values-of-attributes-using-single-NOT/m-p/350532#M103775</guid>
      <dc:creator>Richfez</dc:creator>
      <dc:date>2017-03-10T12:22:15Z</dc:date>
    </item>
    <item>
      <title>Re: Remove multiple values of attributes using single NOT</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Remove-multiple-values-of-attributes-using-single-NOT/m-p/350533#M103776</link>
      <description>&lt;P&gt;For small list, you can use following subsearch method. Provide space separated list of IP in the subsearch eval command.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=foo sourcetype=bar [| gentimes start=-1 | eval IP="xxx.xx.xx.xx yyy.yy.yy.yy zzz.zz.zz.zz"  | table IP | makemv IP  ] ..| rest of the search
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 10 Mar 2017 15:32:56 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Remove-multiple-values-of-attributes-using-single-NOT/m-p/350533#M103776</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2017-03-10T15:32:56Z</dc:date>
    </item>
  </channel>
</rss>

