Splunk Search

How to make timechart with ratio failed/total ?

AnaSpiStats
Engager

This is my search:

message_data_type=gd*| timechart count by message_data_type limit=10

These are my results:

AnaSpiStats_0-1684848039033.png

But I need to create a timechart of the  failed/total events ratio.

How can I do that ?

Labels (2)
0 Karma
1 Solution

ITWhisperer
SplunkTrust
SplunkTrust
| timechart count by message_data_type
| addtotals col=f row=t
| eval failedratio=failed/Total
| fields _time failedratio Total

View solution in original post

AnaSpiStats
Engager

failed/Total events 

0 Karma

ITWhisperer
SplunkTrust
SplunkTrust
| timechart count by message_data_type
| addtotals col=f row=t
| eval failedratio=failed/Total
| fields _time failedratio Total

ITWhisperer
SplunkTrust
SplunkTrust

Is that what you really want to do? What if there are zero failed events - Success/zero is infinity, or Failed/zero is infinity if there are zero Success events?

0 Karma
Get Updates on the Splunk Community!

Introducing the Splunk Community Dashboard Challenge!

Welcome to Splunk Community Dashboard Challenge! This is your chance to showcase your skills in creating ...

Get the T-shirt to Prove You Survived Splunk University Bootcamp

As if Splunk University, in Las Vegas, in-person, with three days of bootcamps and labs weren’t enough, now ...

Wondering How to Build Resiliency in the Cloud?

IT leaders are choosing Splunk Cloud as an ideal cloud transformation platform to drive business resilience,  ...