<?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: Where and or statement for multiple values in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Where-and-or-statement-for-multiple-values/m-p/487862#M136310</link>
    <description>&lt;P&gt;try this?&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;where (CT=Tier_1 or CT=Tier_2) AND (CPU_used&amp;gt;=50 or mem_used&amp;gt;=50  or mem_alloc&amp;gt;=0.9 or CPU_alloc&amp;gt;=0.9) 
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Wed, 20 Nov 2019 17:26:31 GMT</pubDate>
    <dc:creator>mayurr98</dc:creator>
    <dc:date>2019-11-20T17:26:31Z</dc:date>
    <item>
      <title>Where and or statement for multiple values</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Where-and-or-statement-for-multiple-values/m-p/487861#M136309</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;

&lt;P&gt;I'm building a search that tracks the use of memory allocated(mem_alloc), memory in use(mem_used), CPU in use(CPU_used) CPU allocated (CPU_alloc) along with the Cluster type (CT) for our vmware envrioment.   My base query works perfect but when I try to build the logic behind it using where, and , or. I keep getting false positives, like the example below.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;where CT=Tier_1 or CT=Tier_2 and CPU_used&amp;gt;=50 or mem_used&amp;gt;=50  or mem_alloc&amp;gt;=0.9 or CPU_alloc&amp;gt;=0.9 
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I end up getting results that have different cluster tiers in them&lt;/P&gt;

&lt;BLOCKQUOTE&gt;
&lt;P&gt;|CT |                                     |CPU_used|                        |mem_used|                     |mem_alloc|                    |CPU_alloc|&lt;BR /&gt;
|Tier_2                                     |50.01|                                  |25.35|                                |.82  |                               |.82  |&lt;BR /&gt;
|Tier_1                                     |62.23|                                  |72.33|                                |.90  |                               |.65  |&lt;BR /&gt;
|Tier_2                                     |45.53|                                  |32.55|                                |.97  |                               |.55  |&lt;BR /&gt;
|Tier_4                                     |23.25|                                  |36.58|                                |1.01|                               |3.25|&lt;BR /&gt;
|Tier_5                                     |40.32|                                  |85.15|                                |3.25|                               |1.11|&lt;BR /&gt;
I need to find a way to be able to narrow it down to Tier_1 or Tier_2 clusters only, and alert if any of the values break the thresholds in the where statements.&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;</description>
      <pubDate>Wed, 30 Sep 2020 03:02:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Where-and-or-statement-for-multiple-values/m-p/487861#M136309</guid>
      <dc:creator>codedtech</dc:creator>
      <dc:date>2020-09-30T03:02:16Z</dc:date>
    </item>
    <item>
      <title>Re: Where and or statement for multiple values</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Where-and-or-statement-for-multiple-values/m-p/487862#M136310</link>
      <description>&lt;P&gt;try this?&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;where (CT=Tier_1 or CT=Tier_2) AND (CPU_used&amp;gt;=50 or mem_used&amp;gt;=50  or mem_alloc&amp;gt;=0.9 or CPU_alloc&amp;gt;=0.9) 
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 20 Nov 2019 17:26:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Where-and-or-statement-for-multiple-values/m-p/487862#M136310</guid>
      <dc:creator>mayurr98</dc:creator>
      <dc:date>2019-11-20T17:26:31Z</dc:date>
    </item>
    <item>
      <title>Re: Where and or statement for multiple values</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Where-and-or-statement-for-multiple-values/m-p/487863#M136311</link>
      <description>&lt;P&gt;That worked,  how would I repeat the process for Tier_3 where the values are different from Tier_1 and Tier 2 in the same query?&lt;/P&gt;</description>
      <pubDate>Wed, 30 Sep 2020 03:02:36 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Where-and-or-statement-for-multiple-values/m-p/487863#M136311</guid>
      <dc:creator>codedtech</dc:creator>
      <dc:date>2020-09-30T03:02:36Z</dc:date>
    </item>
    <item>
      <title>Re: Where and or statement for multiple values</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Where-and-or-statement-for-multiple-values/m-p/487864#M136312</link>
      <description>&lt;P&gt;try:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;((CT=Tier_1 or CT=Tier_2) AND (CPU_used&amp;gt;=50 or mem_used&amp;gt;=50  or mem_alloc&amp;gt;=0.9 or CPU_alloc&amp;gt;=0.9)) OR (CT=Tier_3 AND ( cpu_used&amp;gt;50 OR mem_used&amp;gt;60...))
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Please upvote/accept the answer if it works for you.&lt;/P&gt;</description>
      <pubDate>Wed, 20 Nov 2019 18:53:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Where-and-or-statement-for-multiple-values/m-p/487864#M136312</guid>
      <dc:creator>mayurr98</dc:creator>
      <dc:date>2019-11-20T18:53:38Z</dc:date>
    </item>
  </channel>
</rss>

