<?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: Can you help me with my query that uses multiple where conditions? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Can-you-help-me-with-my-query-that-uses-multiple-where/m-p/406017#M167285</link>
    <description>&lt;P&gt;remove your where condition and see the value of count against the server and message. See what the count shows&lt;/P&gt;</description>
    <pubDate>Wed, 03 Oct 2018 17:13:39 GMT</pubDate>
    <dc:creator>Sukisen1981</dc:creator>
    <dc:date>2018-10-03T17:13:39Z</dc:date>
    <item>
      <title>Can you help me with my query that uses multiple where conditions?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Can-you-help-me-with-my-query-that-uses-multiple-where/m-p/406016#M167284</link>
      <description>&lt;P&gt;I have a search to identify when a particular server activates "hardware mode" and doesn't exit within a certain time range. &lt;/P&gt;

&lt;P&gt;So basically, after my stats count by search, I've narrowed the results down to servers that don't report both "hardware activated" and "hardware exited" . But now, I am left with multiple servers that have 1 entry and some of these are "hardware exited", and I am trying to exclude those so I only see servers that have a message of "hardware activated" .&lt;/P&gt;

&lt;P&gt;So my results might look like this:&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;server1 HW mode activated&lt;BR /&gt;
server2 HW mode exited&lt;BR /&gt;
server3 HW mode exited&lt;BR /&gt;
server4 HW mode activated&lt;BR /&gt;
server5 HW mode exited&lt;/STRONG&gt;&lt;/P&gt;

&lt;P&gt;This is what I'm using for a search to keep out servers that show BOTH messages (and my attempt to also further narrow it down to "HW Mode Activated"&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;| stats values(message) as message count by server&lt;BR /&gt;
| where count &amp;lt; 2 AND message="HW mode activated"&lt;BR /&gt;
| table server, message, count&lt;/STRONG&gt;&lt;/P&gt;

&lt;P&gt;What am I missing here? It says results not found, even though I do have a server that has only the message "HW mode activated" after reducing the results to those with only 1 count. &lt;/P&gt;</description>
      <pubDate>Wed, 03 Oct 2018 13:02:12 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Can-you-help-me-with-my-query-that-uses-multiple-where/m-p/406016#M167284</guid>
      <dc:creator>jcleary47</dc:creator>
      <dc:date>2018-10-03T13:02:12Z</dc:date>
    </item>
    <item>
      <title>Re: Can you help me with my query that uses multiple where conditions?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Can-you-help-me-with-my-query-that-uses-multiple-where/m-p/406017#M167285</link>
      <description>&lt;P&gt;remove your where condition and see the value of count against the server and message. See what the count shows&lt;/P&gt;</description>
      <pubDate>Wed, 03 Oct 2018 17:13:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Can-you-help-me-with-my-query-that-uses-multiple-where/m-p/406017#M167285</guid>
      <dc:creator>Sukisen1981</dc:creator>
      <dc:date>2018-10-03T17:13:39Z</dc:date>
    </item>
    <item>
      <title>Re: Can you help me with my query that uses multiple where conditions?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Can-you-help-me-with-my-query-that-uses-multiple-where/m-p/406018#M167286</link>
      <description>&lt;P&gt;Hi @jcleary47,&lt;BR /&gt;
Can you try below query? Please make sure query before this is extracting message and server field.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| search message="HW mode activated"
| stats count by server
| where count &amp;lt; 2
| eval message="HW mode activated"
| table server, message, count
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;eval statement is just added in case you want message to be displayed. Hope this helps!!&lt;/P&gt;</description>
      <pubDate>Wed, 03 Oct 2018 18:16:35 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Can-you-help-me-with-my-query-that-uses-multiple-where/m-p/406018#M167286</guid>
      <dc:creator>VatsalJagani</dc:creator>
      <dc:date>2018-10-03T18:16:35Z</dc:date>
    </item>
  </channel>
</rss>

