Splunk Search

How to display the bar with both values even when there are no results for failed?

splunkuser320
Path Finder

I have a bar graph that shows the status (Success and failed). I want to display the bar with both values even when there are no results for failed.  Currently, it shows a bar with only success status. 

 

 

Labels (2)
0 Karma
1 Solution

gcusello
SplunkTrust
SplunkTrust

Hi @splunkuser320 ,

as @ITWhisperer said, if you could share your code, it's easier to help you, anyway, supposing your code, you could use something like this:

<your_search>
| timechart count BY host 
| eval 
   failed=if(isnull(failed),0,failed), 
   success=if(isnull(success),0,success)

Ciao.

Giuseppe

View solution in original post

gcusello
SplunkTrust
SplunkTrust

Hi @splunkuser320 ,

as @ITWhisperer said, if you could share your code, it's easier to help you, anyway, supposing your code, you could use something like this:

<your_search>
| timechart count BY host 
| eval 
   failed=if(isnull(failed),0,failed), 
   success=if(isnull(success),0,success)

Ciao.

Giuseppe

ITWhisperer
SplunkTrust
SplunkTrust

Please share your current SPL, preferably in a code block </>

0 Karma
Get Updates on the Splunk Community!

OpenTelemetry for Legacy Apps? Yes, You Can!

This article is a follow-up to my previous article posted on the OpenTelemetry Blog, "Your Critical Legacy App ...

UCC Framework: Discover Developer Toolkit for Building Technology Add-ons

The Next-Gen Toolkit for Splunk Technology Add-on Development The Universal Configuration Console (UCC) ...

.conf25 Community Recap

Hello Splunkers, And just like that, .conf25 is in the books! What an incredible few days — full of learning, ...