<?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 Calculate percentage by eval status in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Calculate-percentage-by-eval-status/m-p/560899#M159415</link>
    <description>&lt;P&gt;Hi Everyone!&amp;nbsp;&lt;/P&gt;&lt;P&gt;Could you please help, how to calculate (UP percentage) by app_service&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have the query as:&amp;nbsp;&lt;/P&gt;&lt;P&gt;eval status=if(success="successful .Statuscode:200", "UP", "DOWN"&lt;BR /&gt;| table&amp;nbsp; &amp;nbsp;app_service&amp;nbsp; &amp;nbsp; status&lt;BR /&gt;&lt;BR /&gt;I get the table I need, but I have difficulty calculating the "UP" percentage and total percentage per app_service from the above query&lt;/P&gt;&lt;P&gt;Thank you&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 27 Jul 2021 02:18:19 GMT</pubDate>
    <dc:creator>Noah</dc:creator>
    <dc:date>2021-07-27T02:18:19Z</dc:date>
    <item>
      <title>Calculate percentage by eval status</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Calculate-percentage-by-eval-status/m-p/560899#M159415</link>
      <description>&lt;P&gt;Hi Everyone!&amp;nbsp;&lt;/P&gt;&lt;P&gt;Could you please help, how to calculate (UP percentage) by app_service&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have the query as:&amp;nbsp;&lt;/P&gt;&lt;P&gt;eval status=if(success="successful .Statuscode:200", "UP", "DOWN"&lt;BR /&gt;| table&amp;nbsp; &amp;nbsp;app_service&amp;nbsp; &amp;nbsp; status&lt;BR /&gt;&lt;BR /&gt;I get the table I need, but I have difficulty calculating the "UP" percentage and total percentage per app_service from the above query&lt;/P&gt;&lt;P&gt;Thank you&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 27 Jul 2021 02:18:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Calculate-percentage-by-eval-status/m-p/560899#M159415</guid>
      <dc:creator>Noah</dc:creator>
      <dc:date>2021-07-27T02:18:19Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate percentage by eval status</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Calculate-percentage-by-eval-status/m-p/560909#M159420</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/236678"&gt;@Noah&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can you try this?&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| makeresults 
| eval success="successful .Statuscode:200" , app_service="jobber"
| eval status=if(success="successful .Statuscode:200", "UP", "DOWN") 
| stats count, count(eval(status="UP")) as up_count by app_service 
| eval perc= round((up_count/count) * 100,4)
| table count up_count app_service perc&lt;/LI-CODE&gt;&lt;P&gt;An upvote would be appreciated and Accept solution if this reply helps!&lt;/P&gt;</description>
      <pubDate>Tue, 27 Jul 2021 04:23:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Calculate-percentage-by-eval-status/m-p/560909#M159420</guid>
      <dc:creator>venkatasri</dc:creator>
      <dc:date>2021-07-27T04:23:02Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate percentage by eval status</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Calculate-percentage-by-eval-status/m-p/561022#M159459</link>
      <description>&lt;P&gt;Thank you &lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/163730"&gt;@venkatasri&lt;/a&gt;&amp;nbsp;Venkatasri! This definitely helped with some modifications. Much appreciated!&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 27 Jul 2021 13:30:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Calculate-percentage-by-eval-status/m-p/561022#M159459</guid>
      <dc:creator>Noah</dc:creator>
      <dc:date>2021-07-27T13:30:44Z</dc:date>
    </item>
  </channel>
</rss>

