Splunk Search

How to edit my search to create a chart that inserts "NO" wherever the value is blank?

gudavasr
Path Finder

Hi,

I have a chart like this from a search:

source="*.log" "Found TaskId" | | dedup source  |  eval FileFoundDate =  valdate + "_" + valtime  | eval Foundforvaldate = "YES" |  chart values(Foundforvaldate) over  TaskId  by   valdate  usenull=f useother=f

This is my current output:

TaskID   20150601   20150602   20150603
123        YES                    YES
213                    YES        YES
214                               YES

How can I insert "NO" wherever the value is blank?

Thank You

Tags (3)
0 Karma
1 Solution

woodcock
Esteemed Legend

Like this:

source="*.log" "Found TaskId" | | dedup source | eval FileFoundDate = valdate + "_" + valtime | eval Foundforvaldate = "YES" | chart values(Foundforvaldate) over TaskId by valdate usenull=f useother=f | fillnull value="NO"

View solution in original post

woodcock
Esteemed Legend

Like this:

source="*.log" "Found TaskId" | | dedup source | eval FileFoundDate = valdate + "_" + valtime | eval Foundforvaldate = "YES" | chart values(Foundforvaldate) over TaskId by valdate usenull=f useother=f | fillnull value="NO"

gudavasr
Path Finder

Thank You.

0 Karma
Get Updates on the Splunk Community!

Observe and Secure All Apps with Splunk

  Join Us for Our Next Tech Talk: Observe and Secure All Apps with SplunkAs organizations continue to innovate ...

What’s New & Next in Splunk SOAR

Security teams today are dealing with more alerts, more tools, and more pressure than ever.  Join us for an ...

Observability Unlocked: Kubernetes Monitoring with Splunk Observability Cloud

 Ready to master Kubernetes and cloud monitoring like the pros? Join Splunk’s Growth Engineering team for an ...