Dashboards & Visualizations

Radial Gauge - show zero when no results found

mgagliardi
Path Finder

I guess what I'm looking for is a way to set a "minimum value" (of zero) on a radial gauge when no results are found with the search. Some background:
1. Searching for event(s) in the past 4 hours.
2. If those events have occured then I get results and the gauge "plots" as I'd expect.
3. If no events have occured the gauge doesn't show up and I get the "no results found" message.

Obviously I understand why I'm getting that message. Unfortunately I suspect the users of the dashboard will instead think something is broken. So...how do I "force" the gauge to appear and simply show a value of zero?

TIA!

Tags (1)
0 Karma
1 Solution

alacercogitatus
SplunkTrust
SplunkTrust

You could do a fillnull if you wanted to. I'm assuming your result is "count" that you want on the gauge.

your_search | stats count | fillnull count value=0 | gauge count

View solution in original post

alacercogitatus
SplunkTrust
SplunkTrust

You could do a fillnull if you wanted to. I'm assuming your result is "count" that you want on the gauge.

your_search | stats count | fillnull count value=0 | gauge count

mgagliardi
Path Finder

That works, thanks!

0 Karma

sujith_usha_kum
Explorer

seriously?

0 Karma

MuS
SplunkTrust
SplunkTrust

does your search for 3. return nothing or 0? maybe this is your 'problem'. Try to change your search so it returns a '0' instead of nothing if no results were found

Get Updates on the Splunk Community!

Index This | I am a number, but when you add ‘G’ to me, I go away. What number am I?

March 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with another ...

What’s New in Splunk App for PCI Compliance 5.3.1?

The Splunk App for PCI Compliance allows customers to extend the power of their existing Splunk solution with ...

Extending Observability Content to Splunk Cloud

Register to join us !   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to ...