<?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: How do you calculate availability with 2 searches? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-do-you-calculate-availability-with-2-searches/m-p/439502#M174020</link>
    <description>&lt;P&gt;thanks @renjith.nair &lt;/P&gt;

&lt;P&gt;Yes Perfect, this determine our unavailability&lt;/P&gt;

&lt;P&gt;How i can have the availability, eval (100-availability) ?&lt;/P&gt;</description>
    <pubDate>Fri, 21 Dec 2018 08:35:31 GMT</pubDate>
    <dc:creator>serviceinfrastr</dc:creator>
    <dc:date>2018-12-21T08:35:31Z</dc:date>
    <item>
      <title>How do you calculate availability with 2 searches?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-you-calculate-availability-with-2-searches/m-p/439500#M174018</link>
      <description>&lt;P&gt;Hi team,&lt;/P&gt;

&lt;P&gt;I want to determine the availabilty of my application with the http status code &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;(Number of request http &amp;gt;= 400 / Number of request http =&amp;lt;200) * 100
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I have my two requests :&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=nginx status&amp;gt;=400 host=dnginx01 server_name=toto.toto.fr NOT http_user_agent="*PRTG*" server_name="toto.toto.fr" status=501 | stats count as total
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;and &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=nginx status&amp;lt;=200 host=dnginx01 server_name=toto.toto.fr NOT http_user_agent="*PRTG*" server_name="toto.toto.fr" | stats count as total
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;But i don't know how i can do this operation&lt;/P&gt;</description>
      <pubDate>Tue, 18 Dec 2018 09:19:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-you-calculate-availability-with-2-searches/m-p/439500#M174018</guid>
      <dc:creator>serviceinfrastr</dc:creator>
      <dc:date>2018-12-18T09:19:16Z</dc:date>
    </item>
    <item>
      <title>Re: How do you calculate availability with 2 searches?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-you-calculate-availability-with-2-searches/m-p/439501#M174019</link>
      <description>&lt;P&gt;@serviceinfrastructure,&lt;/P&gt;

&lt;P&gt;Try&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; index=nginx server_name="toto.toto.fr" NOT http_user_agent="*PRTG*" 
 |stats count(eval(if(status&amp;gt;=400,status,null()))) as c_400,count(eval(if(status&amp;lt;=200,status,null()))) as c_200
 |eval availability=(c_400/c_200)*100
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;PS: removed &lt;CODE&gt;status=501&lt;/CODE&gt; condition from your first search because then you don't need status&amp;gt;=400 condition. Please add this using &lt;CODE&gt;AND&lt;/CODE&gt; if needed.&lt;/P&gt;</description>
      <pubDate>Tue, 18 Dec 2018 13:23:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-you-calculate-availability-with-2-searches/m-p/439501#M174019</guid>
      <dc:creator>renjith_nair</dc:creator>
      <dc:date>2018-12-18T13:23:29Z</dc:date>
    </item>
    <item>
      <title>Re: How do you calculate availability with 2 searches?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-you-calculate-availability-with-2-searches/m-p/439502#M174020</link>
      <description>&lt;P&gt;thanks @renjith.nair &lt;/P&gt;

&lt;P&gt;Yes Perfect, this determine our unavailability&lt;/P&gt;

&lt;P&gt;How i can have the availability, eval (100-availability) ?&lt;/P&gt;</description>
      <pubDate>Fri, 21 Dec 2018 08:35:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-you-calculate-availability-with-2-searches/m-p/439502#M174020</guid>
      <dc:creator>serviceinfrastr</dc:creator>
      <dc:date>2018-12-21T08:35:31Z</dc:date>
    </item>
    <item>
      <title>Re: How do you calculate availability with 2 searches?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-you-calculate-availability-with-2-searches/m-p/439503#M174021</link>
      <description>&lt;P&gt;@serviceinfrastructure, availability is a complex topics and it purely depends on how you consider (&lt;A href="https://en.wikipedia.org/wiki/Availability"&gt;https://en.wikipedia.org/wiki/Availability&lt;/A&gt;). But here , if the unavailability is in % (for e.g. 30%) , then yes availability is 100-30=70 %&lt;/P&gt;</description>
      <pubDate>Fri, 21 Dec 2018 09:02:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-you-calculate-availability-with-2-searches/m-p/439503#M174021</guid>
      <dc:creator>renjith_nair</dc:creator>
      <dc:date>2018-12-21T09:02:14Z</dc:date>
    </item>
  </channel>
</rss>

