execute a script when alert conditions are met


I need to execute a certain script and/or a binary when certain alerts are triggered.
can’t make it work. probably missing something simple

relevant config file:

# Define the condition (CPU usage exceeding 50% for 5 minutes)
alarm = on
trigger = $cpu_user > 50
duration = 5m

command = /scripts/alertme.sh

Environment/Browser/Agent’s version etc

Debian 11
latest netdata

What I expected to happen

the script is executed

what I may be doing wrong? how to debug this?
Is there somewhere a minimal example I can follow?

In terms of alert configurations the place to set the custom script is the exec attribute - Configure alerts | Learn Netdata

The default SCRIPT is Netdata’s alarm-notify.sh , which supports all the notifications methods Netdata supports, including custom hooks.

Probably looking to alarm-notify.sh could be a good example to follow.

I am aware of /usr/libexec/netdata/plugins.d/alarm-notify.sh.
it gets executed, as we are receiving the configured Slack notifications.
We want to run our own script instead.
According to the doc Configure alerts | Learn Netdata
it is just a matter to pointing the exec parameter to it. That does not work for us.
not sure how to debug it.
there are few log files in /var/log/netdata but neither is helpful.
maybe there is some global option to increase verbosity of the logs so we see what netdata does not like about our script?
I double checked the permissions. they are set exactly to what alarm-notify.sh has

ok, that goes beyond my knowledge on this domain so I’ve raised this internally to see if someone can help.

thanks, if someone can reach me about this, that would be great.