Splunk Search

How to eliminate zero values

ravichandran
Explorer

I am executing the following search query:
eventtype="some_error"| timechart span=1h count(eventtype)

The result shows by hour span. I want to show only the hour where the error count is greater than 0

Tags (1)
1 Solution

somesoni2
Revered Legend

Try this

eventtype="some_error" | bucket span=1h _time | stats count(eventtype) by _time

View solution in original post

somesoni2
Revered Legend

Try this

eventtype="some_error" | bucket span=1h _time | stats count(eventtype) by _time
Get Updates on the Splunk Community!

Splunk + ThousandEyes: Correlate frontend, app, and network data to troubleshoot ...

 Are you tired of troubleshooting delays caused by siloed frontend, application, and network data? We've got a ...

Splunk Observability for AI

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

🔐 Trust at Every Hop: How mTLS in Splunk Enterprise 10.0 Makes Security Simpler

From Idea to Implementation: Why Splunk Built mTLS into Splunk Enterprise 10.0  mTLS wasn’t just a checkbox ...