Splunk Search

I need to exclude eventID 1058 but only when the host is ServerA or ServerB

Tellon
New Member

I need to exclude eventID 1058 but only when the host is ServerA or ServerB if its ServerC then I still want to see the event.

I tried NOT (EventID=1058 AND Server=ServerA OR Server=ServerB)

But this is not working as desired.

0 Karma

Jeff_Lightly_Sp
Communicator

I tried this with some of my data and this may be a solution for you. The AND, I believe is implied so not needed (notice the parens):

  • sourcetype= NOT EventID=1058 AND (Server=ServerA OR Server=ServerB)

Hope this helps!

0 Karma
Get Updates on the Splunk Community!

Stay Connected: Your Guide to May Tech Talks, Office Hours, and Webinars!

Take a look below to explore our upcoming Community Office Hours, Tech Talks, and Webinars this month. This ...

They're back! Join the SplunkTrust and MVP at .conf24

With our highly anticipated annual conference, .conf, comes the fez-wearers you can trust! The SplunkTrust, as ...

Enterprise Security Content Update (ESCU) | New Releases

Last month, the Splunk Threat Research Team had two releases of new security content via the Enterprise ...