Splunk Dev

How to limit each result maximum triggers of a custom alert action?

martinpu
Communicator

I'm looking to limit the the maximum results returned for a custom alert action to for example 10.

 

If a user chooses to trigger the alert action for each result - it should limit to 10 triggers per result. I have looked into maxresultrows but didn't get anywhere with it as it would have to defined in limits.conf.

Is it possible to add  | head 10 to each saved alert in an app or something like that for only alerts that have my custom alert action?

 

Thanks in advance

Labels (1)
0 Karma

bowesmana
SplunkTrust
SplunkTrust

You could make the trigger action 'custom' and add the head 10 command to the alert, but that will be specific to all actions in the alert, not just your custom action.

martinpu
Communicator

Thanks for your answer bowesmana, do you have an example I could try out? 

As I'm not sure how I would go about making the trigger action custom.

0 Karma

bowesmana
SplunkTrust
SplunkTrust

bowesmana_0-1665100550709.png

 

0 Karma
Get Updates on the Splunk Community!

Splunk Up Your Game: Why It's Time to Embrace Python 3.9+ and OpenSSL 3.0

Did you know that for Splunk Enterprise 9.4, Python 3.9 is the default interpreter? This shift is not just a ...

See your relevant APM services, dashboards, and alerts in one place with the updated ...

As a Splunk Observability user, you have a lot of data you have to manage, prioritize, and troubleshoot on a ...

Cultivate Your Career Growth with Fresh Splunk Training

Growth doesn’t just happen—it’s nurtured. Like tending a garden, developing your Splunk skills takes the right ...