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!

Accelerating Observability as Code with the Splunk AI Assistant

We’ve seen in previous posts what Observability as Code (OaC) is and how it’s now essential for managing ...

Integrating Splunk Search API and Quarto to Create Reproducible Investigation ...

 Splunk is More Than Just the Web Console For Digital Forensics and Incident Response (DFIR) practitioners, ...

Congratulations to the 2025-2026 SplunkTrust!

Hello, Splunk Community! We are beyond thrilled to announce our newest group of SplunkTrust members!  The ...