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!

Technical Workshop Series: Splunk Data Management and SPL2 | Register here!

Hey, Splunk Community! Ready to take your data management skills to the next level? Join us for a 3-part ...

Spotting Financial Fraud in the Haystack: A Guide to Behavioral Analytics with Splunk

In today's digital financial ecosystem, security teams face an unprecedented challenge. The sheer volume of ...

Solve Problems Faster with New, Smarter AI and Integrations in Splunk Observability

Solve Problems Faster with New, Smarter AI and Integrations in Splunk Observability As businesses scale ...