<?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: Query - How to check failed % &amp;gt; X in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Query-How-to-check-failed-gt-X/m-p/671859#M230211</link>
    <description>&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;my hint is to use some filenames which don't contains any special marks when you are searching, calculate or manipulate data. If/when you want those "fancy names" on your output it's better to use like&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;rename fooPercent as foo%&lt;/LI&gt;&lt;LI&gt;rename bar as "this is bar"&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;on last command on your SPL. With this way you will get much easier life with SPL &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;/P&gt;&lt;P&gt;r. Ismo&lt;/P&gt;</description>
    <pubDate>Thu, 14 Dec 2023 08:43:02 GMT</pubDate>
    <dc:creator>isoutamo</dc:creator>
    <dc:date>2023-12-14T08:43:02Z</dc:date>
    <item>
      <title>Query - How to check failed % &gt; X</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Query-How-to-check-failed-gt-X/m-p/671806#M230183</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;BR /&gt;I need help in a splunk search.&amp;nbsp;&lt;BR /&gt;My requirement is get the stats for failed and successful count along with the percentage of Failed and&amp;nbsp; Successful&amp;nbsp; and at last I would need to fetch the stats only when the failed % is &amp;gt; 10 %&lt;/P&gt;&lt;P&gt;My query works fine&amp;nbsp; until the below&lt;/P&gt;&lt;P&gt;index=abcd&lt;BR /&gt;| eval status= case(statuscode &amp;lt; 400, "Success", statuscode &amp;gt; 399,"Failed")&lt;BR /&gt;| stats count(status) as TOTAL&amp;nbsp; count(eval(status="Success")) as Success_count&amp;nbsp;&amp;nbsp;count(eval(status="Failed")) as Failed_count&amp;nbsp; by Name, URL&lt;BR /&gt;| eval Success%= ((Success_count /TOTAL)*100)&lt;BR /&gt;| eval Failed%= ((Failed_count&amp;nbsp;/TOTAL)*100)&lt;BR /&gt;&lt;BR /&gt;The above works and I get the table with&amp;nbsp;Name&amp;nbsp;URL&amp;nbsp;TOTAL&amp;nbsp;&amp;nbsp;Success_count&amp;nbsp; &amp;nbsp;Failed_count&amp;nbsp; &amp;nbsp;Success%&amp;nbsp;Failed%&lt;BR /&gt;&lt;BR /&gt;Now, when I add the below to the above query, It fails&amp;nbsp;&lt;BR /&gt;| where&amp;nbsp;Failed% &amp;gt; 10&lt;BR /&gt;How do I get the failed% &amp;gt; 10 with the above table. Please assist&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 13 Dec 2023 21:59:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Query-How-to-check-failed-gt-X/m-p/671806#M230183</guid>
      <dc:creator>suvi6789</dc:creator>
      <dc:date>2023-12-13T21:59:17Z</dc:date>
    </item>
    <item>
      <title>Re: Query - How to check failed % &gt; X</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Query-How-to-check-failed-gt-X/m-p/671812#M230186</link>
      <description>&lt;P&gt;You may need to put single quotes around your field in the where clause&lt;BR /&gt;&lt;BR /&gt;Example:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| makeresults
    | eval
        "Fail%"=25
    | where 'Fail%'&amp;gt;10&lt;/LI-CODE&gt;</description>
      <pubDate>Wed, 13 Dec 2023 23:00:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Query-How-to-check-failed-gt-X/m-p/671812#M230186</guid>
      <dc:creator>dtburrows3</dc:creator>
      <dc:date>2023-12-13T23:00:14Z</dc:date>
    </item>
    <item>
      <title>Re: Query - How to check failed % &gt; X</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Query-How-to-check-failed-gt-X/m-p/671813#M230187</link>
      <description>&lt;P&gt;I think Splunk can be finicky about some special characters in fieldnames when evaluating logic statements&lt;BR /&gt;&lt;BR /&gt;I think the same applies for fieldnames containing "{" or "}" and maybe even "."&lt;/P&gt;</description>
      <pubDate>Wed, 13 Dec 2023 23:01:56 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Query-How-to-check-failed-gt-X/m-p/671813#M230187</guid>
      <dc:creator>dtburrows3</dc:creator>
      <dc:date>2023-12-13T23:01:56Z</dc:date>
    </item>
    <item>
      <title>Re: Query - How to check failed % &gt; X</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Query-How-to-check-failed-gt-X/m-p/671845#M230203</link>
      <description>&lt;P&gt;Many thanks for the update. I will verify and get back to you&lt;/P&gt;</description>
      <pubDate>Thu, 14 Dec 2023 07:25:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Query-How-to-check-failed-gt-X/m-p/671845#M230203</guid>
      <dc:creator>suvi6789</dc:creator>
      <dc:date>2023-12-14T07:25:02Z</dc:date>
    </item>
    <item>
      <title>Re: Query - How to check failed % &gt; X</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Query-How-to-check-failed-gt-X/m-p/671859#M230211</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;my hint is to use some filenames which don't contains any special marks when you are searching, calculate or manipulate data. If/when you want those "fancy names" on your output it's better to use like&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;rename fooPercent as foo%&lt;/LI&gt;&lt;LI&gt;rename bar as "this is bar"&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;on last command on your SPL. With this way you will get much easier life with SPL &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;/P&gt;&lt;P&gt;r. Ismo&lt;/P&gt;</description>
      <pubDate>Thu, 14 Dec 2023 08:43:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Query-How-to-check-failed-gt-X/m-p/671859#M230211</guid>
      <dc:creator>isoutamo</dc:creator>
      <dc:date>2023-12-14T08:43:02Z</dc:date>
    </item>
    <item>
      <title>Re: Query - How to check failed % &gt; X</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Query-How-to-check-failed-gt-X/m-p/671964#M230233</link>
      <description>&lt;P&gt;Many thanks for all your inputs. It is working as expected&lt;/P&gt;</description>
      <pubDate>Thu, 14 Dec 2023 19:39:23 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Query-How-to-check-failed-gt-X/m-p/671964#M230233</guid>
      <dc:creator>suvi6789</dc:creator>
      <dc:date>2023-12-14T19:39:23Z</dc:date>
    </item>
  </channel>
</rss>

