Splunk Search

Single value visualization

orca
Explorer

I understand as per docs single value timechart command is required to put sparkline and trendline. However If I am doing the availability % of my service for example "last 24 hours" and it failed once then my sparkline shows one fall but number always shows as 100% because timechart picks the stats over latest bucket while rendering the number.

Currently in Splunk its like:

Screen Shot 2021-01-07 at 11.19.52 PM.png

 

 

But ideally I would like to show it as 

Screen Shot 2021-01-07 at 11.21.07 PM.png

my search:

index=network sourcetype=nt:logs | stats count(eval('Summary.Error.Code'!="")) as failed_count count as total_count by Test,_time
| eval availability = 100 - ((failed_count/total_count)*100)
| table Test _time availability
| timechart avg(availability) by Test

Any help is appreciated.

Labels (1)
0 Karma
Get Updates on the Splunk Community!

Splunk Observability for AI

Don’t miss out on an exciting Tech Talk on Splunk Observability for AI!Discover how Splunk’s agentic AI ...

Splunk Enterprise Security 8.x: The Essential Upgrade for Threat Detection, ...

Watch On Demand the Tech Talk on November 6 at 11AM PT, and empower your SOC to reach new heights! Duration: ...

Splunk Observability as Code: From Zero to Dashboard

For the details on what Self-Service Observability and Observability as Code is, we have some awesome content ...