<?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: Exclude value based on subsearch in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Exclude-value-based-on-subsearch/m-p/374352#M110041</link>
    <description>&lt;P&gt;Thank you! It works!&lt;/P&gt;</description>
    <pubDate>Thu, 29 Jun 2017 15:33:02 GMT</pubDate>
    <dc:creator>ngerosa</dc:creator>
    <dc:date>2017-06-29T15:33:02Z</dc:date>
    <item>
      <title>Exclude value based on subsearch</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Exclude-value-based-on-subsearch/m-p/374345#M110034</link>
      <description>&lt;P&gt;Hello,&lt;BR /&gt;
I want to exclude some values if that have the field SPAN_LOSS_MAX=50 between midnight to 7 a.m.&lt;/P&gt;

&lt;P&gt;This is my approach:&lt;/P&gt;

&lt;P&gt;index="flap" DELTA_SPAN&amp;gt;=3 | search NOT &lt;BR /&gt;
    [search index="flap" SPAN_LOSS_MAX=50 | dedup CONCATENATE_Z sortby +_time &lt;BR /&gt;
|eval Hour=strftime(_time,"%H") &lt;BR /&gt;
|where Hour&amp;gt;=00 AND Hour&amp;lt;=7&lt;BR /&gt;
|stats count by Hour]&lt;BR /&gt;
|dedup CONCATENATE_Z sortby +_time&lt;BR /&gt;
| eval Hour=strftime(_time,"%H") &lt;BR /&gt;
| chart count as FLAP by Hour&lt;/P&gt;

&lt;P&gt;But this search returns also  values that are in the subsearch.&lt;/P&gt;

&lt;P&gt;Any Ideas?&lt;/P&gt;

&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 14:40:57 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Exclude-value-based-on-subsearch/m-p/374345#M110034</guid>
      <dc:creator>ngerosa</dc:creator>
      <dc:date>2020-09-29T14:40:57Z</dc:date>
    </item>
    <item>
      <title>Re: Exclude value based on subsearch</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Exclude-value-based-on-subsearch/m-p/374346#M110035</link>
      <description>&lt;P&gt;Hello ngerosa,&lt;/P&gt;

&lt;P&gt;There is already a default hour extraction called date_hour.. if you don't have it, I will recommend building the extraction yourself to be able to filter since search command.&lt;/P&gt;

&lt;P&gt;index="flap" DELTA_SPAN&amp;gt;=3 NOT NOT (SPAN_LOSS_MAX=50 AND date_hour&amp;gt;=0 AND date_hour&amp;lt;=7)&lt;BR /&gt;
| dedup CONCATENATE_Z sortby + _time&lt;BR /&gt;
| chart count AS FLAP by date_hour&lt;/P&gt;

&lt;P&gt;Hope it helps,&lt;BR /&gt;
Regards.&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 14:36:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Exclude-value-based-on-subsearch/m-p/374346#M110035</guid>
      <dc:creator>rafaelsalazar</dc:creator>
      <dc:date>2020-09-29T14:36:44Z</dc:date>
    </item>
    <item>
      <title>Re: Exclude value based on subsearch</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Exclude-value-based-on-subsearch/m-p/374347#M110036</link>
      <description>&lt;P&gt;Why not just do this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index="flap" DELTA_SPAN&amp;gt;=3 |eval Hour=tonumber(strftime(_time,"%H") )
| where NOT (SPAN_LOSS_MAX=50 AND Hour&amp;gt;=0 AND Hour&amp;lt;7)
|dedup CONCATENATE_Z sortby +_time
| eval Hour=strftime(_time,"%H") 
| chart count as FLAP by Hour
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 29 Jun 2017 14:20:41 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Exclude-value-based-on-subsearch/m-p/374347#M110036</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2017-06-29T14:20:41Z</dc:date>
    </item>
    <item>
      <title>Re: Exclude value based on subsearch</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Exclude-value-based-on-subsearch/m-p/374348#M110037</link>
      <description>&lt;P&gt;Thanks it works! Just a question: &lt;BR /&gt;
if I want to exclude also 11 p.m.?&lt;BR /&gt;
I tried  | where NOT (SPAN_LOSS_MAX=50 AND Hour&amp;gt;=0 AND Hour&amp;lt;7 AND Hour !=23 ) but it didn't work.&lt;BR /&gt;
Thanks&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 14:41:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Exclude-value-based-on-subsearch/m-p/374348#M110037</guid>
      <dc:creator>ngerosa</dc:creator>
      <dc:date>2020-09-29T14:41:00Z</dc:date>
    </item>
    <item>
      <title>Re: Exclude value based on subsearch</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Exclude-value-based-on-subsearch/m-p/374349#M110038</link>
      <description>&lt;P&gt;Try this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;...| where NOT (SPAN_LOSS_MAX=50 AND Hour&amp;gt;=23 AND Hour&amp;lt;7)
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 29 Jun 2017 15:06:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Exclude-value-based-on-subsearch/m-p/374349#M110038</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2017-06-29T15:06:48Z</dc:date>
    </item>
    <item>
      <title>Re: Exclude value based on subsearch</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Exclude-value-based-on-subsearch/m-p/374350#M110039</link>
      <description>&lt;P&gt;I've already tried but it didn't work.&lt;/P&gt;</description>
      <pubDate>Thu, 29 Jun 2017 15:25:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Exclude-value-based-on-subsearch/m-p/374350#M110039</guid>
      <dc:creator>ngerosa</dc:creator>
      <dc:date>2017-06-29T15:25:01Z</dc:date>
    </item>
    <item>
      <title>Re: Exclude value based on subsearch</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Exclude-value-based-on-subsearch/m-p/374351#M110040</link>
      <description>&lt;P&gt;NOT (SPAN_LOSS_MAX=50 AND ((Hour&amp;gt;=0 AND Hour&amp;lt;7) OR Hour=23))&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 14:36:53 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Exclude-value-based-on-subsearch/m-p/374351#M110040</guid>
      <dc:creator>rafaelsalazar</dc:creator>
      <dc:date>2020-09-29T14:36:53Z</dc:date>
    </item>
    <item>
      <title>Re: Exclude value based on subsearch</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Exclude-value-based-on-subsearch/m-p/374352#M110041</link>
      <description>&lt;P&gt;Thank you! It works!&lt;/P&gt;</description>
      <pubDate>Thu, 29 Jun 2017 15:33:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Exclude-value-based-on-subsearch/m-p/374352#M110041</guid>
      <dc:creator>ngerosa</dc:creator>
      <dc:date>2017-06-29T15:33:02Z</dc:date>
    </item>
  </channel>
</rss>

