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!

.conf24 | Registration Open!

Hello, hello! I come bearing good news: Registration for .conf24 is now open!   conf is Splunk’s rad annual ...

ICYMI - Check out the latest releases of Splunk Edge Processor

Splunk is pleased to announce the latest enhancements to Splunk Edge Processor.  HEC Receiver authorization ...

Introducing the 2024 SplunkTrust!

Hello, Splunk Community! We are beyond thrilled to announce our newest group of SplunkTrust members!  The ...