Splunk Search

Why "*" start does not include the void value

michaelteck
Explorer

Hello everyone, 

I'm working on Splunk Entreprise and on the Search & Reporting app. 
I made many drop-down menu to filter my data. 
I've a special field who can be "void" and with value. 
How can I make include the void value on the drop-down menu's ? 
Because when I select "*" on the drop-down menu Splunk return all the value of the field but I want to select the "void" value too.

Thanks in advance!

Labels (1)
Tags (1)
0 Karma
1 Solution

PickleRick
SplunkTrust
SplunkTrust

Well, the answer can be "because that's just how Splunk works". And it's important to know that.

If you're matching a field value to something (even if it's a wildcard meaning any value), the field must exist.

If the field does not exist for a given event (which can be also interpreted as the field having null value), it will not match.

It is important because it can cause unexpected results if you're trying to match your events wrongly (because as you noticed, field=* does not mean "regardles of whethere there is any value in that field but means "if there is a value in that field, regardless of what it is - a subtle, yet significant difference).

It also means that matching for field!=value is not the same as matching "NOT field=value". The first condition means that there must be the field and its value must be different from the specified value (which means that the condition won't match an event where there is no field at all!) and the second condition means that either there is a field which has another value or there isn't such field at all.

It's important to learn this distinction because it can make all the difference between searching and finding the right stuff and not finding it.

View solution in original post

0 Karma

PickleRick
SplunkTrust
SplunkTrust

Well, the answer can be "because that's just how Splunk works". And it's important to know that.

If you're matching a field value to something (even if it's a wildcard meaning any value), the field must exist.

If the field does not exist for a given event (which can be also interpreted as the field having null value), it will not match.

It is important because it can cause unexpected results if you're trying to match your events wrongly (because as you noticed, field=* does not mean "regardles of whethere there is any value in that field but means "if there is a value in that field, regardless of what it is - a subtle, yet significant difference).

It also means that matching for field!=value is not the same as matching "NOT field=value". The first condition means that there must be the field and its value must be different from the specified value (which means that the condition won't match an event where there is no field at all!) and the second condition means that either there is a field which has another value or there isn't such field at all.

It's important to learn this distinction because it can make all the difference between searching and finding the right stuff and not finding it.

0 Karma

ITWhisperer
SplunkTrust
SplunkTrust

"*" means any non-null value. If you want to "include" null values in your filter, you need to remove the filter completely.

0 Karma
Got questions? Get answers!

Join the Splunk Community Slack to learn, troubleshoot, and make connections with fellow Splunk practitioners in real time!

Meet up IRL or virtually!

Join Splunk User Groups to connect and learn in-person by region or remotely by topic or industry.

Get Updates on the Splunk Community!

Mastering Threat Intelligence in ES 8.5, Splunk AI Assistant v2, and More from Splunk ...

Splunk Lantern is Splunk’s customer success center that provides practical guidance from Splunk experts on key ...

Break the Build: Inside the KubeDoom Lounge at .conf26

    You step up to the machine. The pixelated corridors of a certain 1993 FPS load in front of you, EMP Pulse ...

Splunk Auto Ingestion Parallel Pipeline Scaling

Why this feature matters Many Splunk environments experience ingestion pressure long before the host is fully ...