Other Usage

How to count the number of alert returning results?

jip31
Motivator

Hi

I have a lot of alerts in my Splunk apps

Is there a way to count the number of alerts returning result by days, by month...

Is it possible ?

Thanks 

Labels (1)
Tags (3)
0 Karma
1 Solution

richgalloway
SplunkTrust
SplunkTrust

Sorry, I left that out of my original reply.  The number of results is in the result_count field.  If the alert did anything, then the alert_actions field is not empty.

If an alert fired (was triggered), it will be in the output of this command

| rest splunk_server=local /servicesNS/-/-/alerts/fired_alerts | search title!="-"

 

---
If this reply helps you, Karma would be appreciated.

View solution in original post

0 Karma

richgalloway
SplunkTrust
SplunkTrust

Start with this query and modify as necessary to suit your requirements.  Note that, by default, the _internal index only has 30 days of day so there may no "by month".

index=_internal source=*scheduler.log* savedsearch_name=* sourcetype=scheduler alert_actions!=""
---
If this reply helps you, Karma would be appreciated.
0 Karma

jip31
Motivator

Thanks

Is alert_actions is the field that an alert has generated a result?

alert_actions!=

 If yes, if i want to count the alerts actions, its enough to do a stats count(alert_actions) ?

0 Karma

richgalloway
SplunkTrust
SplunkTrust

Sorry, I left that out of my original reply.  The number of results is in the result_count field.  If the alert did anything, then the alert_actions field is not empty.

If an alert fired (was triggered), it will be in the output of this command

| rest splunk_server=local /servicesNS/-/-/alerts/fired_alerts | search title!="-"

 

---
If this reply helps you, Karma would be appreciated.
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!

Observe and Secure All Apps with Splunk

 Join Us for Our Next Tech Talk: Observe and Secure All Apps with SplunkAs organizations continue to innovate ...

What's New in Splunk Observability - August 2025

What's New We are excited to announce the latest enhancements to Splunk Observability Cloud as well as what is ...

Introduction to Splunk AI

How are you using AI in Splunk? Whether you see AI as a threat or opportunity, AI is here to stay. Lucky for ...