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!

Detecting Remote Code Executions With the Splunk Threat Research Team

WATCH NOWRemote code execution (RCE) vulnerabilities pose a significant risk to organizations. If exploited, ...

Enter the Splunk Community Dashboard Challenge for Your Chance to Win!

The Splunk Community Dashboard Challenge is underway! This is your chance to showcase your skills in creating ...

.conf24 | Session Scheduler is Live!!

.conf24 is happening June 11 - 14 in Las Vegas, and we are thrilled to announce that the conference catalog ...