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!

Automatic Discovery Part 1: What is Automatic Discovery in Splunk Observability Cloud ...

If you’ve ever deployed a new database cluster, spun up a caching layer, or added a load balancer, you know it ...

Real-Time Fraud Detection: How Splunk Dashboards Protect Financial Institutions

Financial fraud isn't slowing down. If anything, it's getting more sophisticated. Account takeovers, credit ...

Splunk + ThousandEyes: Correlate frontend, app, and network data to troubleshoot ...

 Are you tired of troubleshooting delays caused by siloed frontend, application, and network data? We've got a ...