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!

Index This | What is broken 80% of the time by February?

December 2025 Edition   Hayyy Splunk Education Enthusiasts and the Eternally Curious!    We’re back with this ...

Unlock Faster Time-to-Value on Edge and Ingest Processor with New SPL2 Pipeline ...

Hello Splunk Community,   We're thrilled to share an exciting update that will help you manage your data more ...

Splunk MCP & Agentic AI: Machine Data Without Limits

Discover how the Splunk Model Context Protocol (MCP) Server can revolutionize the way your organization uses ...