<?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 to get Percentage using two Queries. in Monitoring Splunk</title>
    <link>https://community.splunk.com/t5/Monitoring-Splunk/Query-to-get-Percentage-using-two-Queries/m-p/611318#M9117</link>
    <description>&lt;P&gt;Thanks for this query&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/213957"&gt;@richgalloway&lt;/a&gt;&amp;nbsp;!&amp;nbsp;&lt;/P&gt;&lt;P&gt;It worked. Further I added the below piece of query to get the percentage.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;| eval Error_Percentage=round(100*count/Total_Transaction,2)."%"&lt;BR /&gt;| table Error_Message,count, Error_Percentage&lt;/P&gt;</description>
    <pubDate>Tue, 30 Aug 2022 14:19:55 GMT</pubDate>
    <dc:creator>Deprasad</dc:creator>
    <dc:date>2022-08-30T14:19:55Z</dc:date>
    <item>
      <title>Query to get Percentage using two Queries?</title>
      <link>https://community.splunk.com/t5/Monitoring-Splunk/Query-to-get-Percentage-using-two-Queries/m-p/611289#M9115</link>
      <description>&lt;P&gt;I've 2 queries, 1 will give the the total no of events and the other will give the counts by error type.&lt;BR /&gt;I'm trying to join the two queries so that I can get the percentage of each error type.&lt;BR /&gt;&lt;BR /&gt;Query 1:&lt;BR /&gt;index=app&amp;nbsp; "ResponseLoggingFilter" "Operation"&lt;BR /&gt;| stats count as Total_Transaction&lt;BR /&gt;&lt;BR /&gt;Query 2:&lt;BR /&gt;index=app "ResponseLoggingFilter"&amp;nbsp;"Operation"&amp;nbsp; NOT "OK" NOT "1041"&lt;BR /&gt;| rex "(?:.+message\"\:\")(?&amp;lt;Error_Message&amp;gt;.+)(?:\"\,)"&lt;BR /&gt;| stats count by Error_Message&lt;/P&gt;</description>
      <pubDate>Tue, 30 Aug 2022 13:06:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Monitoring-Splunk/Query-to-get-Percentage-using-two-Queries/m-p/611289#M9115</guid>
      <dc:creator>Deprasad</dc:creator>
      <dc:date>2022-08-30T13:06:38Z</dc:date>
    </item>
    <item>
      <title>Re: Query to get Percentage using two Queries.</title>
      <link>https://community.splunk.com/t5/Monitoring-Splunk/Query-to-get-Percentage-using-two-Queries/m-p/611298#M9116</link>
      <description>&lt;P&gt;See if this helps&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=app  "ResponseLoggingFilter" "Operation"
| eventstats count as Total_Transaction
| rex "(?:.+message\"\:\")(?&amp;lt;Error_Message&amp;gt;.+)(?:\"\,)"
| eval Error_Message = if(match(_raw, "OK") OR match(_raw, "1041"), null(), Error_Message)
| stats max(Total_Transaction) as Total_Transaction, count by Error_Message&lt;/LI-CODE&gt;</description>
      <pubDate>Tue, 30 Aug 2022 13:03:55 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Monitoring-Splunk/Query-to-get-Percentage-using-two-Queries/m-p/611298#M9116</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2022-08-30T13:03:55Z</dc:date>
    </item>
    <item>
      <title>Re: Query to get Percentage using two Queries.</title>
      <link>https://community.splunk.com/t5/Monitoring-Splunk/Query-to-get-Percentage-using-two-Queries/m-p/611318#M9117</link>
      <description>&lt;P&gt;Thanks for this query&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/213957"&gt;@richgalloway&lt;/a&gt;&amp;nbsp;!&amp;nbsp;&lt;/P&gt;&lt;P&gt;It worked. Further I added the below piece of query to get the percentage.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;| eval Error_Percentage=round(100*count/Total_Transaction,2)."%"&lt;BR /&gt;| table Error_Message,count, Error_Percentage&lt;/P&gt;</description>
      <pubDate>Tue, 30 Aug 2022 14:19:55 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Monitoring-Splunk/Query-to-get-Percentage-using-two-Queries/m-p/611318#M9117</guid>
      <dc:creator>Deprasad</dc:creator>
      <dc:date>2022-08-30T14:19:55Z</dc:date>
    </item>
  </channel>
</rss>

