Splunk Search

How to calculate successful percentage grouped by another field?

csahoo
Explorer
0 Karma
1 Solution

somesoni2
Revered Legend

Give this a try (and may be post your question as text instead of picture next time😁 )

Your Base search
| where status="Received" OR status="Success"
| stats count(eval(status="Received")) as Received count(eval(status="Success")) as Success by sourceNodeCode labelType
| eval SuccessRate=round((Success*100)/ Received,2)
| stats list(labelType) as labelType list(Received) as GenerationCount list(SuccessRate) as "SuccessRate%" by sourceNodeCode

  

View solution in original post

csahoo
Explorer

Thank you very much  @ITWhisperer @somesoni2 both the queries are working fine

0 Karma

somesoni2
Revered Legend

Give this a try (and may be post your question as text instead of picture next time😁 )

Your Base search
| where status="Received" OR status="Success"
| stats count(eval(status="Received")) as Received count(eval(status="Success")) as Success by sourceNodeCode labelType
| eval SuccessRate=round((Success*100)/ Received,2)
| stats list(labelType) as labelType list(Received) as GenerationCount list(SuccessRate) as "SuccessRate%" by sourceNodeCode

  

ITWhisperer
SplunkTrust
SplunkTrust

ITWhisperer_0-1652286765400.png

 

Get Updates on the Splunk Community!

Updated Team Landing Page in Splunk Observability

We’re making some changes to the team landing page in Splunk Observability, based on your feedback. The ...

New! Splunk Observability Search Enhancements for Splunk APM Services/Traces and ...

Regardless of where you are in Splunk Observability, you can search for relevant APM targets including service ...

Webinar Recap | Revolutionizing IT Operations: The Transformative Power of AI and ML ...

The Transformative Power of AI and ML in Enhancing Observability   In the realm of IT operations, the ...