Splunk Search

Excluding Messages With Custom Field Matching List of Values

deees
New Member

I'm tasked with auditing syslog messages from some network devices for suspicious activity. I can use the IN operator to extract the significant messages by message code.

Since some of these messages are legitimately generated by several management  servers, I want to remove those messages from the report. Blocking all the messages created by the management servers is excessive and could potentially create a security risk. I'm trying to restrict the filtering for these management server to the messages that are legitimate part of their operation.

I can select the syslog messages of interest using the message code field and a list of message numbers using the "IN" operator.

I wanted to use the same logic to exclude the management servers using the logic in the form of a "NOT  DEVICE_IP IN (192.168.1.10, 192.168.1.20, 192.168.1.30)"

Unfortunately, it doesn't work. What am I missing? Is there an equivalent function that will allow me to exclude a list of IP's? 

Labels (1)
0 Karma

gcusello
SplunkTrust
SplunkTrust

Hi @deees,

try this:

NOT (DEVICE_IP="192.168.1.10" OR DEVICE_IP="192.168.1.20" OR DEVICE_IP="192.168.1.30")

Ciao.

Giuseppe

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!

Announcing Modern Navigation: A New Era of Splunk User Experience

We are excited to introduce the Modern Navigation feature in the Splunk Platform, available to both cloud and ...

Modernize your Splunk Apps – Introducing Python 3.13 in Splunk

We are excited to announce that the upcoming releases of Splunk Enterprise 10.2.x and Splunk Cloud Platform ...

Step into “Hunt the Insider: An Splunk ES Premier Mystery” to catch a cybercriminal ...

After a whole week of being on call, you fell asleep on your keyboard, and you hit a sequence of buttons that ...