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!

Built-in Service Level Objectives Management to Bridge the Gap Between Service & ...

Wednesday, May 29, 2024  |  11AM PST / 2PM ESTRegister now and join us to learn more about how you can ...

Get Your Exclusive Splunk Certified Cybersecurity Defense Engineer at Splunk .conf24 ...

We’re excited to announce a new Splunk certification exam being released at .conf24! If you’re headed to Vegas ...

Share Your Ideas & Meet the Lantern team at .Conf! Plus All of This Month’s New ...

Splunk Lantern is Splunk’s customer success center that provides advice from Splunk experts on valuable data ...