Splunk Search

Seprating null and empty fields

gimbil
Explorer

Hi All,

I have multiple cases with my date:
some have empty src value: e.g,
id=abc src= lr=2
some does not have src at all: e.g.,
id=cde lr=5
and the rest have src with values: e.g.,
id=rty src=df lr=5

The question is how can I separate these three cases? I tried isnull(src) but it does not work.

Thanks

Tags (3)
0 Karma

lukejadamec
Super Champion

Try:

search | fillnull value=null | stats count by id, src, lr

fillnull will fill empty values even when the field does not exist.

0 Karma
Get Updates on the Splunk Community!

Introducing the 2024 SplunkTrust!

Hello, Splunk Community! We are beyond thrilled to announce our newest group of SplunkTrust members!  The ...

Introducing the 2024 Splunk MVPs!

We are excited to announce the 2024 cohort of the Splunk MVP program. Splunk MVPs are passionate members of ...

Splunk Custom Visualizations App End of Life

The Splunk Custom Visualizations apps End of Life for SimpleXML will reach end of support on Dec 21, 2024, ...