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
Career Survey
First 500 qualified respondents will receive a $20 gift card! Tell us about your professional Splunk journey.

Can’t make it to .conf25? Join us online!

Get Updates on the Splunk Community!

Community Content Calendar, September edition

Welcome to another insightful post from our Community Content Calendar! We're thrilled to continue bringing ...

Splunkbase Unveils New App Listing Management Public Preview

Splunkbase Unveils New App Listing Management Public PreviewWe're thrilled to announce the public preview of ...

Leveraging Automated Threat Analysis Across the Splunk Ecosystem

Are you leveraging automation to its fullest potential in your threat detection strategy?Our upcoming Security ...