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!

Adoption of RUM and APM at Splunk

    Unleash the power of Splunk Observability   Watch Now In this can't miss Tech Talk! The Splunk Growth ...

Routing logs with Splunk OTel Collector for Kubernetes

The Splunk Distribution of the OpenTelemetry (OTel) Collector is a product that provides a way to ingest ...

Welcome to the Splunk Community!

(view in My Videos) We're so glad you're here! The Splunk Community is place to connect, learn, give back, and ...