Splunk Search

filtering search to exclude all instances of field 1 for when certain results in field 2

shouldntdothat
Explorer

I have a search that brakes down some router alarms . my fields are Host_IP & Alarm
What I'm trying to do is filter for hosts that only take a specific alarm and do not have certain alarms.
these are state changes . these alarms are SessionUp SessionDown SessionProtChange
Im looking to isolate Hosts that only exhibit SessionUp alarm without having the usual SessionDown and SessionProtChange

Thanks.

Tags (1)
0 Karma
1 Solution

somesoni2
Revered Legend

What's your current search? Try something like this

your current search with field Host_IP and Alarm
| stats values(Alarm) as Alarms by Host_IP
| where mvcount(Alarms)=1 AND Alarms="SessionUp"

View solution in original post

0 Karma

somesoni2
Revered Legend

What's your current search? Try something like this

your current search with field Host_IP and Alarm
| stats values(Alarm) as Alarms by Host_IP
| where mvcount(Alarms)=1 AND Alarms="SessionUp"
0 Karma

shouldntdothat
Explorer

Thank You, that helped

0 Karma

DalJeanis
Legend

@shouldntdothat - We've converted @somesoni2's comment to an answer. Please accept the answer so the question will show as closed.

0 Karma
Get Updates on the Splunk Community!

Splunk Mobile: Your Brand-New Home Screen

Meet Your New Mobile Hub  Hello Splunk Community!  Staying connected to your data—no matter where you are—is ...

Introducing Value Insights (Beta): Understand the Business Impact your organization ...

Real progress on your strategic priorities starts with knowing the business outcomes your teams are delivering ...

Enterprise Security (ES) Essentials 8.3 is Now GA — Smarter Detections, Faster ...

As of today, Enterprise Security (ES) Essentials 8.3 is now generally available, helping SOC teams simplify ...