Alerting action trigger script

Hello ,

I would like to use Grafana as our NAC (Network access control ) assistant , by querying Elasticsearch events upon match criteria , trigger alert that its action would execute a custom python script in my case pass the script arguments of alert details and the script will announce our NAC fot the anomaly.
My question is Grafan alerting supporing allready such script execute mechanism or its on the road map?

Please advice


Grafana does not have alerting support for elasticsearch yet. Besides that, Grafana supports sending alerts to webhooks.


After looking at the weebhook I managed to easily create a Jenkins pipeline job with generic webhook plugin.

Works like a charm.

Have some examples if someone needs it.

@malanvaneck, could you please send me some details about your solution?

Hi there @zygmuntg,

On Grafana:
In the Alert section, I created a new channel.

On Jenkins:

  • Install the Generic Webhook Trigger Plugin
  • Create a new job and in the config set the Generic Webhook Trigger token to abc123 (Mention above, This could be any token as long as they match.)

There you go! Grafana will now call the Jenkins job when the alert gets triggered.
I, on the other hand, configured the job to use a Jenkinsfile and configured everything from there.

I used a pipeline to figure out where the alert came from, based on the results I remotely triggered other preconfigured Jenkins jobs and passed on the metrics that are sick.