Alerting

Is it possible to export all triggered alerts with alert name, trigger condition(s), and severity?

sophiavc
Engager

Hi,

I'm wondering if it's possible to get an export of all triggered alerts including the alert name, alert trigger condition(s)/alert query, and alert severity as a table (CSV or JSON preferably)?

I can access the triggered alerts from Activity > Triggered Alerts and all configured alerts from Search & Reporting Alerts but have not found a straightforward way to export everything.

For the alert trigger condition(s)/query, I'm looking specifically for what index(es), field(s), and field value(s) the alert is monitoring for.

Thanks in advance!

Labels (3)
0 Karma

richgalloway
SplunkTrust
SplunkTrust

There are REST commands to get all of that.

| rest /servicesNS/-/-/alerts/fired_alerts/ will give you a list of triggered alerts

| rest /servicesNS/-/-/saved/searches splunk_server=local | search alert_type!="always" will provide a list of all alerts, including the search string.

The trick (perhaps worthy of a Master's thesis) is to parse the search string to discover what the alert is looking for.  If you're lucky, the alert.comparator, alert.threshold, and alert.condition fields will tell you which fields will trigger the alert, but most of the time that will not be so obvious.

The index and field names sought may be explicitly mentioned in the search or they could be hidden in a macro, eventtype, datamodel, or tag.  Index names may be unnamed completely and come from the user's default index list.

---
If this reply helps you, Karma would be appreciated.
Get Updates on the Splunk Community!

Join Us for Splunk University and Get Your Bootcamp Game On!

If you know, you know! Splunk University is the vibe this summer so register today for bootcamps galore ...

.conf24 | Learning Tracks for Security, Observability, Platform, and Developers!

.conf24 is taking place at The Venetian in Las Vegas from June 11 - 14. Continue reading to learn about the ...

Announcing Scheduled Export GA for Dashboard Studio

We're excited to announce the general availability of Scheduled Export for Dashboard Studio. Starting in ...