Splunk Search

How to create a dashboard panel of alerts triggered in the past 24 hours that also displays the alert search results?

lyndac
Contributor

I have set up alerting for my app such that it emails the user whenever the count or volume for today is outside of a range (+/- 25%) of the average. The alert is configured to send an email and to show up in the "Triggered Alerts" dashboard.

My users would like to have a panel integrated in to their dashboard that shows the alerts that have fired in the past 24 hours. However, they want to see more detail than I can retrieve from the audit log. I'd like to be able to display the results from the alert that fired rather than just the fact of firing.

My thought was to do index=_audit action=alert_fired and then for each "sid" do a loadjob to get the results.

index=_audit action=alert_fired ss_app=br | map search="|loadjob $sid$"

This does return the result fields (yay!), but I need to be able to associate the results to which alert generated the results so that I can access trigger_time, expiration, and a few other fields in the audit record.

My end goal would be to have something like:

triggered_date, site, server, status, severity

2015-12-07, siteA, serverB, low volume, MEDIUM
2015-12-07, siteA, server C, high count, MEDIUM

0 Karma

woodcock
Esteemed Legend

Try REST API:

|rest/services/alerts/fired_alerts splunk_server=local| table eai:acl.owner eai:acl.app id title triggered_alert_count
0 Karma

renjith_nair
Legend

I am using a summary index to tackle this. So whenever an alert is sent, in the alert actions, I enable summary index and then you can create a dashboard from this summary index for the users. Data goes to summary index is not counted against license meter.

---
What goes around comes around. If it helps, hit it with Karma 🙂

lyndac
Contributor

We you able to include the fields like severity, triggertime, expiration in the summary index somehow? I tried this and I get my results, but no information about the alert that was triggered.

0 Karma

renjith_nair
Legend

We are capturing all these information in the search itself and writing to summary index at the same time. For eg: eval triggered_time=now() |eval severity=1 etc.

---
What goes around comes around. If it helps, hit it with Karma 🙂
0 Karma
Career Survey
First 500 qualified respondents will receive a $20 gift card! Tell us about your professional Splunk journey.

Can’t make it to .conf25? Join us online!

Get Updates on the Splunk Community!

Can’t Make It to Boston? Stream .conf25 and Learn with Haya Husain

Boston may be buzzing this September with Splunk University and .conf25, but you don’t have to pack a bag to ...

Splunk Lantern’s Guide to The Most Popular .conf25 Sessions

Splunk Lantern is a Splunk customer success center that provides advice from Splunk experts on valuable data ...

Unlock What’s Next: The Splunk Cloud Platform at .conf25

In just a few days, Boston will be buzzing as the Splunk team and thousands of community members come together ...