Alerting

how to get list of alerts which are disabled within 24 hours

chandanjaisal
Explorer

I have couple of alerts, among of these alerts some of alerts are disabled. Some of alerts are disabled a week ago, some of alerts are disabled within last 24 hours, I need list of that alert which are disabled within 24 hours only.

Tags (2)
0 Karma
1 Solution

woodcock
Esteemed Legend

You get the list of alerts like this:

|rest/servicesNS/admin/search/saved/searches | search disabled=1 | table title | outputlookup mylookup

You run this as a saved search every 24-hours and use outputlookup to save the results. You also save a similar search to run just before the first one that uses inputlookup and compares the 2 looking for new entries and ignoring old entries like this:

|rest/servicesNS/admin/search/saved/searches | search disabled=1 | table title | eval type="new" | append [|inputlookup mylookup | eval type="old]" | stats values(type) AS types BY title | where types!="old"

View solution in original post

woodcock
Esteemed Legend

You get the list of alerts like this:

|rest/servicesNS/admin/search/saved/searches | search disabled=1 | table title | outputlookup mylookup

You run this as a saved search every 24-hours and use outputlookup to save the results. You also save a similar search to run just before the first one that uses inputlookup and compares the 2 looking for new entries and ignoring old entries like this:

|rest/servicesNS/admin/search/saved/searches | search disabled=1 | table title | eval type="new" | append [|inputlookup mylookup | eval type="old]" | stats values(type) AS types BY title | where types!="old"

chandanjaisal
Explorer

Hi Woodcock
Can we merge these two search

0 Karma

woodcock
Esteemed Legend

Possibly but I think it would be highly inadvisable.

0 Karma
Career Survey
First 500 qualified respondents will receive a $20 gift card! Tell us about your professional Splunk journey.
Get Updates on the Splunk Community!

Tech Talk Recap | Mastering Threat Hunting

Mastering Threat HuntingDive into the world of threat hunting, exploring the key differences between ...

Observability for AI Applications: Troubleshooting Latency

If you’re working with proprietary company data, you’re probably going to have a locally hosted LLM or many ...

Splunk AI Assistant for SPL vs. ChatGPT: Which One is Better?

In the age of AI, every tool promises to make our lives easier. From summarizing content to writing code, ...