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!

September Community Champions: A Shoutout to Our Contributors!

As we close the books on another fantastic month, we want to take a moment to celebrate the people who are the ...

Splunk Decoded: Service Maps vs Service Analyzer Tree View vs Flow Maps

It’s Monday morning, and your phone is buzzing with alert escalations – your customer-facing portal is running ...

What’s New in Splunk Observability – September 2025

What's NewWe are excited to announce the latest enhancements to Splunk Observability, designed to help ITOps ...