Splunk Search

How to create a chart of the error rate over time?

tmtcollins
Explorer

Hi, I would like to create a chart of the error rate over time.  I have data that shows status= DOWNLOAD_COMPLETE  and status = FAILD

I can calculate this for a point in time with the below. But can anyone help get the error rate over time?

 

 logType=error OR logType=service context=retrieve status=DOWNLOAD_COMPLETE OR status=FAILED 
|  stats count(correlationId) as total_count by status  | transpose header_field=status 
| eval errorRate=FAILED/(FAILED+DOWNLOAD_COMPLETE)*100
| table DOWNLOAD_COMPLETE, FAILED, errorRate

 

Labels (4)
0 Karma
1 Solution

richgalloway
SplunkTrust
SplunkTrust

This should do it.

 logType=error OR logType=service context=retrieve status=DOWNLOAD_COMPLETE OR status=FAILED 
| timechart count(correlationId) as total_count by status
| eval errorRate=FAILED/(FAILED+DOWNLOAD_COMPLETE)*100
---
If this reply helps you, Karma would be appreciated.

View solution in original post

0 Karma

richgalloway
SplunkTrust
SplunkTrust

This should do it.

 logType=error OR logType=service context=retrieve status=DOWNLOAD_COMPLETE OR status=FAILED 
| timechart count(correlationId) as total_count by status
| eval errorRate=FAILED/(FAILED+DOWNLOAD_COMPLETE)*100
---
If this reply helps you, Karma would be appreciated.
0 Karma

tmtcollins
Explorer

Worked perfectly! thanks

 

Tags (1)
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 ...