<?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: Why only one condition works for where clause in a tstats search in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Why-only-one-condition-works-for-where-clause-in-a-tstats-search/m-p/405328#M117162</link>
    <description>&lt;P&gt;There will always be a &lt;EM&gt;tiny&lt;/EM&gt; sliver of new events which are not yet accelerated which will be missed when using &lt;CODE&gt;summariesonly=t&lt;/CODE&gt; which is why most content which uses that, has &lt;CODE&gt;latest=-5m&lt;/CODE&gt;.  In your case, though, it is probably the other (back) end.  You are probably only accelerating 7 days of data so that is all that is available REGARDLESS of how wide you make the &lt;CODE&gt;timepicker&lt;/CODE&gt;.  But without &lt;CODE&gt;summariesonly=t&lt;/CODE&gt;, because the matching events still exist in the raw/unaccelerated set the full &lt;CODE&gt;timepicker&lt;/CODE&gt; width is searched and the events are found.  Your datamodel acceleration details control how far back the acceleration goes in time and you may need to extend this setting.&lt;/P&gt;</description>
    <pubDate>Fri, 26 Jul 2019 19:37:14 GMT</pubDate>
    <dc:creator>woodcock</dc:creator>
    <dc:date>2019-07-26T19:37:14Z</dc:date>
    <item>
      <title>Why only one condition works for where clause in a tstats search</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-only-one-condition-works-for-where-clause-in-a-tstats-search/m-p/405326#M117160</link>
      <description>&lt;P&gt;Hi Splunkers,&lt;/P&gt;

&lt;P&gt;when I set 2 conditions for the same field to &lt;CODE&gt;where&lt;/CODE&gt; stanza - I get 0 results. &lt;BR /&gt;
Example: &lt;CODE&gt;| tstats summariesonly=t count from datamodel="Web.Web" where NOT (Web.url="unknown" OR Web.url="/display*") by Web.src Web.user&lt;/CODE&gt; &lt;BR /&gt;
Only if I leave 1 condition or remove &lt;CODE&gt;summariesonly=t&lt;/CODE&gt; from the search it will return results.&lt;BR /&gt;
When I remove one of conditions I get 4K+ results, when I just remove &lt;CODE&gt;summariesonly=t&lt;/CODE&gt; I  get only 1K&lt;BR /&gt;
Is there any explanation?&lt;/P&gt;</description>
      <pubDate>Wed, 24 Jul 2019 08:58:11 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-only-one-condition-works-for-where-clause-in-a-tstats-search/m-p/405326#M117160</guid>
      <dc:creator>evelenke</dc:creator>
      <dc:date>2019-07-24T08:58:11Z</dc:date>
    </item>
    <item>
      <title>Re: Why only one condition works for where clause in a tstats search</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-only-one-condition-works-for-where-clause-in-a-tstats-search/m-p/405327#M117161</link>
      <description>&lt;P&gt;The summariesonly takes events only the summary(datamodel acceleration store) and doesnot take  into events which are not in the accelerated datamodel (DMA). Hence you would see diff in events with and without summariesonly. In general, based on your search window and if you need to take events into account [ which are not in DMA, do not use summariesonly].&lt;/P&gt;

&lt;P&gt;Your search should work. However, how about changing to &lt;CODE&gt;| tstats  count from datamodel="Web.Web" where (Web.url!="unknown" AND Web.url!="/display*") by Web.src, Web.user&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;assuming you don't want unknown and urls startings with /display.&lt;/P&gt;</description>
      <pubDate>Wed, 24 Jul 2019 13:03:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-only-one-condition-works-for-where-clause-in-a-tstats-search/m-p/405327#M117161</guid>
      <dc:creator>lakshman239</dc:creator>
      <dc:date>2019-07-24T13:03:42Z</dc:date>
    </item>
    <item>
      <title>Re: Why only one condition works for where clause in a tstats search</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-only-one-condition-works-for-where-clause-in-a-tstats-search/m-p/405328#M117162</link>
      <description>&lt;P&gt;There will always be a &lt;EM&gt;tiny&lt;/EM&gt; sliver of new events which are not yet accelerated which will be missed when using &lt;CODE&gt;summariesonly=t&lt;/CODE&gt; which is why most content which uses that, has &lt;CODE&gt;latest=-5m&lt;/CODE&gt;.  In your case, though, it is probably the other (back) end.  You are probably only accelerating 7 days of data so that is all that is available REGARDLESS of how wide you make the &lt;CODE&gt;timepicker&lt;/CODE&gt;.  But without &lt;CODE&gt;summariesonly=t&lt;/CODE&gt;, because the matching events still exist in the raw/unaccelerated set the full &lt;CODE&gt;timepicker&lt;/CODE&gt; width is searched and the events are found.  Your datamodel acceleration details control how far back the acceleration goes in time and you may need to extend this setting.&lt;/P&gt;</description>
      <pubDate>Fri, 26 Jul 2019 19:37:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-only-one-condition-works-for-where-clause-in-a-tstats-search/m-p/405328#M117162</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2019-07-26T19:37:14Z</dc:date>
    </item>
    <item>
      <title>Re: Why only one condition works for where clause in a tstats search</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-only-one-condition-works-for-where-clause-in-a-tstats-search/m-p/405329#M117163</link>
      <description>&lt;P&gt;I believe Splunk should review this. This is definitely a bug (or just a new approach of how things should work here) - I've discovered another search is not working, because there's a macro with list of exceptions divided by &lt;CODE&gt;OR&lt;/CODE&gt;). It works in version 7.2.5 (ES 5.2.2), but not in version 7.3.0 (ES 5.3.0). &lt;BR /&gt;
As workaround I can follow your &lt;CODE&gt;!=&lt;/CODE&gt; approach (thanks for advise) , but this is not a single case where we use&lt;CODE&gt;where NOT (...OR ... OR ...)&lt;/CODE&gt; conditions&lt;BR /&gt;
p.s. And removing the &lt;CODE&gt;summariesonly=t&lt;/CODE&gt; lets use &lt;CODE&gt;where NOT (...OR ... OR ...)&lt;/CODE&gt;, but the scope of results is less than expected. Strange...&lt;/P&gt;</description>
      <pubDate>Mon, 05 Aug 2019 13:52:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-only-one-condition-works-for-where-clause-in-a-tstats-search/m-p/405329#M117163</guid>
      <dc:creator>evelenke</dc:creator>
      <dc:date>2019-08-05T13:52:54Z</dc:date>
    </item>
    <item>
      <title>Re: Why only one condition works for where clause in a tstats search</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-only-one-condition-works-for-where-clause-in-a-tstats-search/m-p/405330#M117164</link>
      <description>&lt;P&gt;There's a bit different issue. Please check my answer to lakshman239&lt;/P&gt;</description>
      <pubDate>Mon, 05 Aug 2019 14:13:12 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-only-one-condition-works-for-where-clause-in-a-tstats-search/m-p/405330#M117164</guid>
      <dc:creator>evelenke</dc:creator>
      <dc:date>2019-08-05T14:13:12Z</dc:date>
    </item>
    <item>
      <title>Re: Why only one condition works for where clause in a tstats search</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-only-one-condition-works-for-where-clause-in-a-tstats-search/m-p/405331#M117165</link>
      <description>&lt;P&gt;If this is true, then it is definitely a bug.&lt;/P&gt;</description>
      <pubDate>Mon, 05 Aug 2019 14:26:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-only-one-condition-works-for-where-clause-in-a-tstats-search/m-p/405331#M117165</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2019-08-05T14:26:09Z</dc:date>
    </item>
    <item>
      <title>Re: Why only one condition works for where clause in a tstats search</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-only-one-condition-works-for-where-clause-in-a-tstats-search/m-p/405332#M117166</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;we discovered the same bug after the update from 7.2.x to 7.3.2 in our environement today.&lt;/P&gt;

&lt;P&gt;Using&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;... NOT (host=bla AND source=fasel)
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;doesn't work anymore.&lt;/P&gt;

&lt;P&gt;Also this doesn't work:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;...  (NOT host=bla OR NOT source=fasel)
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;The workaround with&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;...  (host!=bla OR source!=fasel)
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;seems to work fine.&lt;/P&gt;

&lt;P&gt;Has someone already filed a bug with splunk?&lt;/P&gt;

&lt;P&gt;Edit:&lt;BR /&gt;
In 8.0 there is the following fix:&lt;BR /&gt;
2019-07-08  SPL-171713, SPL-171850, SPL-172838, SPL-174080  Search Parser does not fail on tstats w/ complex where clause&lt;/P&gt;

&lt;P&gt;Is that it?&lt;/P&gt;</description>
      <pubDate>Mon, 28 Oct 2019 10:14:23 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-only-one-condition-works-for-where-clause-in-a-tstats-search/m-p/405332#M117166</guid>
      <dc:creator>DATEVeG</dc:creator>
      <dc:date>2019-10-28T10:14:23Z</dc:date>
    </item>
  </channel>
</rss>

