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!

What the End of Support for Splunk Add-on Builder Means for You

Hello Splunk Community! We want to share an important update regarding the future of the Splunk Add-on Builder ...

Solve, Learn, Repeat: New Puzzle Channel Now Live

Welcome to the Splunk Puzzle PlaygroundIf you are anything like me, you love to solve problems, and what ...

Building Reliable Asset and Identity Frameworks in Splunk ES

 Accurate asset and identity resolution is the backbone of security operations. Without it, alerts are ...