Splunk Search

How to make empty fields display as Null

mihall
Path Finder

I am trying to display results that simply report if a certain field contains information or not.

My search is as follows:
Account_Name=da_* "Certificate Issuer Name" | stats count by user Certificate_Issuer_Name | eval Certificate_Issuer_Name=if(Certificate_Issuer_Name=null, "False", "True")

I think I am searching for this correctly, but it only outputs the values that are true. I think the issue might be that the null values are not registered as "Null" in Splunk. It does not show up when I look for how many values that field has, but I see events that have blank space where that info should be.

Is there any way to get these empty results to display in the report? Or is this an issue with how the data is registering in Splunk?

0 Karma
1 Solution

cmerriman
Super Champion

try this:

Account_Name=da_* "Certificate Issuer Name"| eval Certificate_Issuer_Name=if(isnull(Certificate_Issuer_Name), "False", "True") | stats count by user Certificate_Issuer_Name

View solution in original post

cmerriman
Super Champion

try this:

Account_Name=da_* "Certificate Issuer Name"| eval Certificate_Issuer_Name=if(isnull(Certificate_Issuer_Name), "False", "True") | stats count by user Certificate_Issuer_Name
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 ...