Splunk Search

how to get ratio of count filtered results with condition by total grouping by month and field?

falks405
Loves-to-Learn Lots

Hello, I have the next query to get data grouped by month by software version using  condition "where"

 

 

index=tst  | spath path="Check"{} output=Num | where isnotnull(Num)
| timechart dc(run.ID) span=1mon by version | addtotals

 

 

I'm wondering how to display data grouped by month by version with condition "where isnotnull(Num)" with ratio of such number of events by total? 

tried to do this that way.

 

| dedup run.ID
| eventstats count(eval(isnotnull(Num))) as cnt, dc(run.ID) as total by version
| eval p=(cnt/total)*100
| timechart values(p) span=1mon by version

 

Labels (2)
Tags (1)
0 Karma
Get Updates on the Splunk Community!

Join Us for Splunk University and Get Your Bootcamp Game On!

If you know, you know! Splunk University is the vibe this summer so register today for bootcamps galore ...

.conf24 | Learning Tracks for Security, Observability, Platform, and Developers!

.conf24 is taking place at The Venetian in Las Vegas from June 11 - 14. Continue reading to learn about the ...

Announcing Scheduled Export GA for Dashboard Studio

We're excited to announce the general availability of Scheduled Export for Dashboard Studio. Starting in ...