Splunk Enterprise Security

Percent problems

jacqu3sy
Path Finder

Hi,

Struggling to get the percentage to work properly...

I have 3 fields; Open, Closed and New.

I want to report on the percentage of events which have a status of either Closed or Open.

Trying to play with the following but cant get it working;

| eval actioned=if(in(status_group,"Open", "Closed"),"true","false")
| stats count by actioned
| eventstats sum(count) as total
| eval percent= round ( count*100/total,1)
| gauge percent 0 40 60 100
| fillnull value=0

Any ideas? Thanks.

0 Karma

lakshman239
Influencer

You could do something like the below, as you are interested in Open/Closed only

| eval percent= round ( if(actioned="true",count*100/total,0),1) | search percent > 0  
| gauge percent 0 40 60 100 
| fillnull value=0
0 Karma
Get Updates on the Splunk Community!

Announcing Scheduled Export GA for Dashboard Studio

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

Extending Observability Content to Splunk Cloud

Watch Now!   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to leverage ...

More Control Over Your Monitoring Costs with Archived Metrics GA in US-AWS!

What if there was a way you could keep all the metrics data you need while saving on storage costs?This is now ...