Splunk Search

Display 0 on Single Value When No Records Found

troyward
Explorer

So I have a query:

index=......
| bucket _time span=5m
| timechart count as alerts

The search itself runs fine and when there are results to return, I get the number as expected (the number of records in each time period). My problem is if there is nothing at all to return in the search I get "Not Results Found...." and would instead like a 0 displayed. I have tried adding "| fillnull value=0" ad the end after the time chart but still no luck.

Thoughts?

Tags (2)
0 Karma
1 Solution

MuS
Legend

HI troyward,

have a look at this answer https://answers.splunk.com/answers/176466/how-to-use-eval-if-there-is-no-result-from-the-bas-1.html where you can find a way to do it.

Hope this helps ...

cheers, MuS

View solution in original post

MuS
Legend

HI troyward,

have a look at this answer https://answers.splunk.com/answers/176466/how-to-use-eval-if-there-is-no-result-from-the-bas-1.html where you can find a way to do it.

Hope this helps ...

cheers, MuS

Get Updates on the Splunk Community!

Extending Observability Content to Splunk Cloud

Watch Now!   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to leverage ...

More Control Over Your Monitoring Costs with Archived Metrics!

What if there was a way you could keep all the metrics data you need while saving on storage costs?This is now ...

New in Observability Cloud - Explicit Bucket Histograms

Splunk introduces native support for histograms as a metric data type within Observability Cloud with Explicit ...