Getting Data In

How to filter out results based on 2 values in an event?

Sparky1
Explorer

I'm trying to use a where command to filter a search based on 2 values in an event.

So something like where host!=Domain Controller1 and Message!="Bad Username"

But doing it this way is filtering any events that match either host or Message. How can I filter results based on 2 field values?

0 Karma
1 Solution

kmaron
Motivator

Try using NOT (host=DomainController1 AND Message="Bad Username")

View solution in original post

kmaron
Motivator

Try using NOT (host=DomainController1 AND Message="Bad Username")

Get Updates on the Splunk Community!

Adoption of RUM and APM at Splunk

    Unleash the power of Splunk Observability   Watch Now In this can't miss Tech Talk! The Splunk Growth ...

Routing logs with Splunk OTel Collector for Kubernetes

The Splunk Distribution of the OpenTelemetry (OTel) Collector is a product that provides a way to ingest ...

Welcome to the Splunk Community!

(view in My Videos) We're so glad you're here! The Splunk Community is place to connect, learn, give back, and ...