<?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: FIltering a record out based on stats values in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/FIltering-a-record-out-based-on-stats-values/m-p/480504#M134658</link>
    <description>&lt;P&gt;Your 2nd example works like a charm.  Thank you!&lt;/P&gt;</description>
    <pubDate>Fri, 28 Feb 2020 16:50:28 GMT</pubDate>
    <dc:creator>aferone</dc:creator>
    <dc:date>2020-02-28T16:50:28Z</dc:date>
    <item>
      <title>FIltering a record out based on stats values</title>
      <link>https://community.splunk.com/t5/Splunk-Search/FIltering-a-record-out-based-on-stats-values/m-p/480502#M134656</link>
      <description>&lt;P&gt;Greetings all.&lt;/P&gt;

&lt;P&gt;I have this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| stats dc(Indexer) AS conntected_indexers values(Indexer) as Connected by connectType sourceIp sourceHost Ver 
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I have a list of indexers (ind1, ind2, ind3) that if they show up in values(indexer), I want to filter that entire line out of my report.&lt;/P&gt;

&lt;P&gt;How would I do that?  &lt;/P&gt;

&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Fri, 28 Feb 2020 15:40:58 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/FIltering-a-record-out-based-on-stats-values/m-p/480502#M134656</guid>
      <dc:creator>aferone</dc:creator>
      <dc:date>2020-02-28T15:40:58Z</dc:date>
    </item>
    <item>
      <title>Re: FIltering a record out based on stats values</title>
      <link>https://community.splunk.com/t5/Splunk-Search/FIltering-a-record-out-based-on-stats-values/m-p/480503#M134657</link>
      <description>&lt;P&gt;You could use the &lt;CODE&gt;mvfind&lt;/CODE&gt; command to tag rows that do match your exclude list, and then filter those rows away.&lt;/P&gt;

&lt;P&gt;One way to do it, using a run-anywhere example:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| makeresults 
| eval raw="ind1,ind2,ind3"
| makemv delim="," raw
| eval deleteFound=mvfind(raw,"(ind2|ind3)")
| eval deleteNotFound=mvfind(raw,"(ind4|ind6)")
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;In this example, I created deleteFound to show a positive case. If the row has a non-null value for this field, it should be deleted. This can be done by adding this line to the end: &lt;CODE&gt;| where isnull(deleteFound)&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;So after your &lt;CODE&gt;stats&lt;/CODE&gt; command, try this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| eval deleteFound=mvfind(Connected,"(ind1|ind2|ind3)")
| where isnull(deleteFound)
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 28 Feb 2020 16:06:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/FIltering-a-record-out-based-on-stats-values/m-p/480503#M134657</guid>
      <dc:creator>jpolvino</dc:creator>
      <dc:date>2020-02-28T16:06:21Z</dc:date>
    </item>
    <item>
      <title>Re: FIltering a record out based on stats values</title>
      <link>https://community.splunk.com/t5/Splunk-Search/FIltering-a-record-out-based-on-stats-values/m-p/480504#M134658</link>
      <description>&lt;P&gt;Your 2nd example works like a charm.  Thank you!&lt;/P&gt;</description>
      <pubDate>Fri, 28 Feb 2020 16:50:28 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/FIltering-a-record-out-based-on-stats-values/m-p/480504#M134658</guid>
      <dc:creator>aferone</dc:creator>
      <dc:date>2020-02-28T16:50:28Z</dc:date>
    </item>
  </channel>
</rss>

