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
SplunkTrust
SplunkTrust

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
SplunkTrust
SplunkTrust

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!

What's new in Splunk Cloud Platform 9.1.2312?

Hi Splunky people! We are excited to share the newest updates in Splunk Cloud Platform 9.1.2312! Analysts can ...

What’s New in Splunk Security Essentials 3.8.0?

Splunk Security Essentials (SSE) is an app that can amplify the power of your existing Splunk Cloud Platform, ...

Let’s Get You Certified – Vegas-Style at .conf24

Are you ready to level up your Splunk game? Then, let’s get you certified live at .conf24 – our annual user ...