<?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: Summary Field = &amp;quot;OK&amp;quot; or &amp;quot;DOWN&amp;quot; in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Summary-Field-quot-OK-quot-or-quot-DOWN-quot/m-p/175758#M50478</link>
    <description>&lt;P&gt;you mean State="Running" right &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 05 Mar 2014 21:38:40 GMT</pubDate>
    <dc:creator>aelliott</dc:creator>
    <dc:date>2014-03-05T21:38:40Z</dc:date>
    <item>
      <title>Summary Field = "OK" or "DOWN"</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Summary-Field-quot-OK-quot-or-quot-DOWN-quot/m-p/175757#M50477</link>
      <description>&lt;P&gt;I am currently attempting to create a 'summary' type of view within a dashboard stating that this list of services (svc1,svc2,svc3,svc4) are all running on the machine, but is only displaying and either "OK" or "DOWN" Status. If ANY of these services are down, this query should show the "DOWN" status, as this is just a summary panel. &lt;/P&gt;

&lt;P&gt;The search I am working with currently is as follows:&lt;BR /&gt;
    sourcetype=WMI:Service (Name=&lt;SVC_1&gt; OR Name=&lt;SVC_2&gt; OR Name=&lt;SVC_3&gt; OR name=&lt;SVC_4&gt; OR Name=&lt;SVC_5&gt;) | dedup host | eval State = if(State == Running, "OK", "Down") |table _time,host,Name,State| rename Name as "Service Name"&lt;/SVC_5&gt;&lt;/SVC_4&gt;&lt;/SVC_3&gt;&lt;/SVC_2&gt;&lt;/SVC_1&gt;&lt;/P&gt;

&lt;P&gt;That being said, it gives me the display i'm looking for (1 status of either OK or DOWN per machine) though if 1 of the 5 services are down, the summary 'State' field doesn't change to "DOWN".  &lt;/P&gt;

&lt;P&gt;I suppose I'm attempting to summarize the running state of 5 services into one instance of either "OK" if all 5 services are running, but even if only 1 of them is not, then the summary field would switch to a "DOWN" state. &lt;/P&gt;

&lt;P&gt;Let me know if I don't make sense right now.. i've been looking at these things all day, so I apologize for any minced words. Any help is greatly appreciated! &lt;/P&gt;</description>
      <pubDate>Wed, 05 Mar 2014 21:36:47 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Summary-Field-quot-OK-quot-or-quot-DOWN-quot/m-p/175757#M50477</guid>
      <dc:creator>tmarlette</dc:creator>
      <dc:date>2014-03-05T21:36:47Z</dc:date>
    </item>
    <item>
      <title>Re: Summary Field = "OK" or "DOWN"</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Summary-Field-quot-OK-quot-or-quot-DOWN-quot/m-p/175758#M50478</link>
      <description>&lt;P&gt;you mean State="Running" right &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 05 Mar 2014 21:38:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Summary-Field-quot-OK-quot-or-quot-DOWN-quot/m-p/175758#M50478</guid>
      <dc:creator>aelliott</dc:creator>
      <dc:date>2014-03-05T21:38:40Z</dc:date>
    </item>
    <item>
      <title>Re: Summary Field = "OK" or "DOWN"</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Summary-Field-quot-OK-quot-or-quot-DOWN-quot/m-p/175759#M50479</link>
      <description>&lt;P&gt;You could order by State Ascending before deduping, then if there are any "down" it will show up top.. That seems like a much easier solution&lt;/P&gt;

&lt;P&gt;That will require you to move your "if" statement though before the sort,dedup&lt;/P&gt;

&lt;P&gt;| sort State | dedup   etc.&lt;/P&gt;</description>
      <pubDate>Wed, 05 Mar 2014 21:40:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Summary-Field-quot-OK-quot-or-quot-DOWN-quot/m-p/175759#M50479</guid>
      <dc:creator>aelliott</dc:creator>
      <dc:date>2014-03-05T21:40:14Z</dc:date>
    </item>
    <item>
      <title>Re: Summary Field = "OK" or "DOWN"</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Summary-Field-quot-OK-quot-or-quot-DOWN-quot/m-p/175760#M50480</link>
      <description>&lt;P&gt;Could you show me how that would look?&lt;/P&gt;</description>
      <pubDate>Wed, 05 Mar 2014 21:42:41 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Summary-Field-quot-OK-quot-or-quot-DOWN-quot/m-p/175760#M50480</guid>
      <dc:creator>tmarlette</dc:creator>
      <dc:date>2014-03-05T21:42:41Z</dc:date>
    </item>
    <item>
      <title>Re: Summary Field = "OK" or "DOWN"</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Summary-Field-quot-OK-quot-or-quot-DOWN-quot/m-p/175761#M50481</link>
      <description>&lt;P&gt;yessir I do. i'm a little loopy at the moment.&lt;/P&gt;</description>
      <pubDate>Wed, 05 Mar 2014 21:43:18 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Summary-Field-quot-OK-quot-or-quot-DOWN-quot/m-p/175761#M50481</guid>
      <dc:creator>tmarlette</dc:creator>
      <dc:date>2014-03-05T21:43:18Z</dc:date>
    </item>
    <item>
      <title>Re: Summary Field = "OK" or "DOWN"</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Summary-Field-quot-OK-quot-or-quot-DOWN-quot/m-p/175762#M50482</link>
      <description>&lt;P&gt;Hi tmarlette,&lt;/P&gt;

&lt;P&gt;based on this use case ... &lt;CODE&gt;the running state of 5 services into one instance of either "OK" if all 5 services are running, but even if only 1 of them is not, then the summary field would switch to a "DOWN" state.&lt;/CODE&gt; ... you can use a search like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; sourcetype=WMI:Service (Name=&amp;lt;svc_1&amp;gt; OR Name=&amp;lt;svc_2&amp;gt; OR Name=&amp;lt;svc_3&amp;gt; OR Name=&amp;lt;svc_4&amp;gt; OR Name=&amp;lt;svc_5&amp;gt;) | dedup host | eventstats count(eval(State="Running")) AS myCount | eval State=if(myCount=="5", "OK", "Down") | table _time,host,Name,State | rename Name as "Service Name"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;this will count all the running states and if the count is &lt;CODE&gt;5&lt;/CODE&gt; the &lt;CODE&gt;State&lt;/CODE&gt; field is &lt;CODE&gt;OK&lt;/CODE&gt;, if the count is not 5 the &lt;CODE&gt;State&lt;/CODE&gt; field is &lt;CODE&gt;Down&lt;/CODE&gt;.&lt;/P&gt;

&lt;P&gt;hope this helps ...&lt;/P&gt;

&lt;P&gt;cheers, MuS&lt;/P&gt;</description>
      <pubDate>Thu, 06 Mar 2014 12:26:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Summary-Field-quot-OK-quot-or-quot-DOWN-quot/m-p/175762#M50482</guid>
      <dc:creator>MuS</dc:creator>
      <dc:date>2014-03-06T12:26:31Z</dc:date>
    </item>
    <item>
      <title>Re: Summary Field = "OK" or "DOWN"</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Summary-Field-quot-OK-quot-or-quot-DOWN-quot/m-p/175763#M50483</link>
      <description>&lt;P&gt;Nevermind I figured this out. thank you sir!!&lt;/P&gt;</description>
      <pubDate>Thu, 06 Mar 2014 14:49:52 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Summary-Field-quot-OK-quot-or-quot-DOWN-quot/m-p/175763#M50483</guid>
      <dc:creator>tmarlette</dc:creator>
      <dc:date>2014-03-06T14:49:52Z</dc:date>
    </item>
    <item>
      <title>Re: Summary Field = "OK" or "DOWN"</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Summary-Field-quot-OK-quot-or-quot-DOWN-quot/m-p/175764#M50484</link>
      <description>&lt;P&gt;This answer works as well, so Thank you very much sir!  I can only mark one answer, but I just tested this and it works well.&lt;/P&gt;</description>
      <pubDate>Thu, 06 Mar 2014 14:51:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Summary-Field-quot-OK-quot-or-quot-DOWN-quot/m-p/175764#M50484</guid>
      <dc:creator>tmarlette</dc:creator>
      <dc:date>2014-03-06T14:51:07Z</dc:date>
    </item>
  </channel>
</rss>

