# Alarm script doesn't get executed

**URL:** <https://community.netdata.cloud/t/alarm-script-doesnt-get-executed/110>\
**Category:** Help\
**Tags:** agent\
**Created:** [September 16, 2020, 8:35am UTC](https://community.netdata.cloud/t/alarm-script-doesnt-get-executed/110 "2020-09-16T08:35:07Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![mrozekma](https://avatars.discourse-cdn.com/v4/letter/m/3bc359/32.png) [@mrozekma](https://community.netdata.cloud/u/mrozekma)\
**Post date:** [September 16, 2020, 8:35am UTC](https://community.netdata.cloud/t/alarm-script-doesnt-get-executed/110/1 "2020-09-16T08:35:07Z")

</div>

I seem to be fundamentally misunderstanding some part of alerting. I have a disk\_usage health alarm setup, and I see it in the web UI, but my “script to execute on alarm” (which just writes to a log file) never gets executed. I do see it executed on another alert, a random ipv4\_tcp\_resets problem I seem to see every time I start netdata, so I know the script works. The only thing I can find that would mess with this is setting the “exec” config entry on the particular alarm, which I’m not doing. What would cause an alarm to show up in the UI, but not to get passed to the script I have registered for all alarms? Thanks!

---

<div class="post-metadata">

**Author:** ![mrozekma](https://avatars.discourse-cdn.com/v4/letter/m/3bc359/32.png) [@mrozekma](https://community.netdata.cloud/u/mrozekma)\
**Post date:** [September 17, 2020, 1:13am UTC](https://community.netdata.cloud/t/alarm-script-doesnt-get-executed/110/2 "2020-09-17T01:13:01Z")

</div>

I left netdata running during the day, and did eventually see a disk\_usage alert when it switched from WARNING to CRITICAL; it looks like it’s just that alarms that are true on startup don’t trigger alerts? Is that correct/intended behavior?

I posted my [error.log](https://pastebin.com/raw/QwCpv4RJ); there’s a lot of noise in it but I didn’t see anything relevant.

---

<div class="post-metadata">

**Author:** ![Thiago\_Marques\_0](https://yyz1.discourse-cdn.com/flex029/user_avatar/community.netdata.cloud/thiago_marques_0/32/281_2.png) [@Thiago\_Marques\_0](https://community.netdata.cloud/u/Thiago_Marques_0)\
**Post date:** [September 16, 2020, 4:25pm UTC](https://community.netdata.cloud/t/alarm-script-doesnt-get-executed/110/3 "2020-09-16T16:25:43Z")

</div>

All right @mrozekma !

Let us know if we can help you.

Best regards!

---

<div class="post-metadata">

**Author:** ![mrozekma](https://avatars.discourse-cdn.com/v4/letter/m/3bc359/32.png) [@mrozekma](https://community.netdata.cloud/u/mrozekma)\
**Post date:** [September 16, 2020, 3:39pm UTC](https://community.netdata.cloud/t/alarm-script-doesnt-get-executed/110/4 "2020-09-16T15:39:56Z")

</div>

I cleared some output files to get a fresh state to post and this time it seems to have worked. I’m realizing from the state of my script-generated log file that the script is running twice at the same time (processing two different alarms), which didn’t occur to me; that may have been causing issues. I’ll post again if I mess things up again; I thought I was just not setting up the alarm correctly, but clearly that wasn’t it. Thanks very much for the help!

---

<div class="post-metadata">

**Author:** ![Thiago\_Marques\_0](https://yyz1.discourse-cdn.com/flex029/user_avatar/community.netdata.cloud/thiago_marques_0/32/281_2.png) [@Thiago\_Marques\_0](https://community.netdata.cloud/u/Thiago_Marques_0)\
**Post date:** [September 16, 2020, 11:27am UTC](https://community.netdata.cloud/t/alarm-script-doesnt-get-executed/110/5 "2020-09-16T11:27:58Z")

</div>

Hi @mrozekma,

A possible problem for you do not have your script executed is the permission your script has, not only the missing execution, but the group and owner can restrict the script to be executed, please, compare the permission that your script has with the permission of /usr/libexec/netdata/plugins.d/alarm-notify.sh.

Best regards!

---

<div class="post-metadata">

**Author:** ![OdysLam](https://yyz1.discourse-cdn.com/flex029/user_avatar/community.netdata.cloud/odyslam/32/98_2.png) [@OdysLam](https://community.netdata.cloud/u/OdysLam)\
**Post date:** [September 16, 2020, 11:12am UTC](https://community.netdata.cloud/t/alarm-script-doesnt-get-executed/110/6 "2020-09-16T11:12:06Z")

</div>

Hi,

Would it be possible to post your `error.log`? (see [docs](https://learn.netdata.cloud/docs/agent/daemon#errorlog). Also please post the health configuration files of both alarms.

We will get to the bottom of this 💪

Best,  
Odysseas
