<?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: Httpstatuscode success/failure in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Httpstatuscode-success-failure/m-p/650113#M224758</link>
    <description>&lt;P&gt;You need to explain your data set in a data centric forum. &amp;nbsp;Assuming that you have a field named API with values "API1", "API2", etc., and a field named status with 200, 403, etc. &amp;nbsp;I think what you are looking for is&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| eval success = if(API == "API1" AND status == "403" OR status == "200", 1, 0)
| bin span=5m _time
| stats count sum(success) as success by countryCode _time
| eval percentage = round(success * 100 / count, 2)
| timechart useother=false limit=100 span=5m values(percentage) as percentage by countryCode&lt;/LI-CODE&gt;</description>
    <pubDate>Wed, 12 Jul 2023 08:16:11 GMT</pubDate>
    <dc:creator>yuanliu</dc:creator>
    <dc:date>2023-07-12T08:16:11Z</dc:date>
    <item>
      <title>Httpstatuscode success/failure</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Httpstatuscode-success-failure/m-p/649958#M224716</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;I have 3 API's&amp;nbsp;&lt;/P&gt;&lt;P&gt;1. in first API the status are code 200 &amp;amp; 403 as a success reaming all status codes are failure&amp;nbsp;&lt;/P&gt;&lt;P&gt;2. in 2nd &amp;amp; 3rd API's only 200 is the success&amp;nbsp; remaining all codes are failure&amp;nbsp;&lt;/P&gt;&lt;P&gt;I need to show graph as a line chart with "Y" axis as success percentage " 0 to 100"&lt;/P&gt;&lt;P&gt;in X-axis need to show time&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have to use below time chart command like...&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;SPAN class=""&gt;|timechart span=5m eval(if(count&amp;gt;10, round(mean(status),2), 100)) as percentage by countryCode useother=false limit=100&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;SPAN class=""&gt;please help on this&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 11 Jul 2023 10:58:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Httpstatuscode-success-failure/m-p/649958#M224716</guid>
      <dc:creator>lucky</dc:creator>
      <dc:date>2023-07-11T10:58:39Z</dc:date>
    </item>
    <item>
      <title>Re: Httpstatuscode success/failure</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Httpstatuscode-success-failure/m-p/650113#M224758</link>
      <description>&lt;P&gt;You need to explain your data set in a data centric forum. &amp;nbsp;Assuming that you have a field named API with values "API1", "API2", etc., and a field named status with 200, 403, etc. &amp;nbsp;I think what you are looking for is&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| eval success = if(API == "API1" AND status == "403" OR status == "200", 1, 0)
| bin span=5m _time
| stats count sum(success) as success by countryCode _time
| eval percentage = round(success * 100 / count, 2)
| timechart useother=false limit=100 span=5m values(percentage) as percentage by countryCode&lt;/LI-CODE&gt;</description>
      <pubDate>Wed, 12 Jul 2023 08:16:11 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Httpstatuscode-success-failure/m-p/650113#M224758</guid>
      <dc:creator>yuanliu</dc:creator>
      <dc:date>2023-07-12T08:16:11Z</dc:date>
    </item>
  </channel>
</rss>

