Splunk Search

If I want to remove an IP address and do a wildcard search, are there any search filter priorities?

dxw350
Path Finder

if I want to remove one IP address and then do a wildcard search, would that wildcard host IP search override the removal I did first? Example:

sourcetype=linux host_ip!=192.168.1.4 host_ip=*|table host_ip
Tags (3)
0 Karma

horsefez
Motivator

Hi dxw350,

no it would not override the removal of the ip address.
You could also first write
sourcetype=linux host_ip=* host_ip!=192.168.1.4 |table host_ip

it wouldn't chance anything.

0 Karma

somesoni2
Revered Legend

The search conditions are by joined by default logical operator of 'AND' , so your wildcard filter will still be applicable.

0 Karma

somesoni2
Revered Legend

If you're including host_ip=* only to get events which non-null value of host_ip, then it's not required as host_ip!=192.168.1.4 will eliminate any event which has host_ip=null. (if you use NOT host_ip=192.168.1.4 then it'll return events with host_ip=null, if any.

0 Karma
Get Updates on the Splunk Community!

Announcing Scheduled Export GA for Dashboard Studio

We're excited to announce the general availability of Scheduled Export for Dashboard Studio. Starting in ...

Extending Observability Content to Splunk Cloud

Watch Now!   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to leverage ...

More Control Over Your Monitoring Costs with Archived Metrics GA in US-AWS!

What if there was a way you could keep all the metrics data you need while saving on storage costs?This is now ...