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!

Upcoming Webinar: Unmasking Insider Threats with Slunk Enterprise Security’s UEBA

Join us on Wed, Dec 10. at 10AM PST / 1PM EST for a live webinar and demo with Splunk experts! Discover how ...

.conf25 technical session recap of Observability for Gen AI: Monitoring LLM ...

If you’re unfamiliar, .conf is Splunk’s premier event where the Splunk community, customers, partners, and ...

A Season of Skills: New Splunk Courses to Light Up Your Learning Journey

There’s something special about this time of year—maybe it’s the glow of the holidays, maybe it’s the ...