Page 1 of 1

Action on Alarm - how?

Posted: Sat 27 May 2023 8:53 am
by Ulric2
I'm running Cumulus MX 3.25.1 b3244 under Ubuntu 22.04 and I'm trying to configure an action to run on detection of a data spike.
I've created a shell script which performs the actions I want and that works from the terminal. Am I able to run it from the "Action" field on the alarms page in CumulusMX? I have tried different ways of configuring it but it does not seem to run the script? At the moment, I just have ~/myScript.sh typed into the Action box. What am I missing?

I can't find much help on this feature so, I'd be grateful for any guidance on how it works.

Re: Action on Alarm - how?

Posted: Sat 27 May 2023 10:33 am
by water01
My understanding is the you put the Action in "set Action" and any parameters to that action in Action Param.

Re: Action on Alarm - how?

Posted: Sat 27 May 2023 10:53 am
by SamiS
I’m not a linux expert, but it might be necessary to refer the action to the shell you are using, eg.

bash /fullpath/to/the/script.sh

Re: Action on Alarm - how?

Posted: Sat 27 May 2023 11:29 am
by broadstairs
I have a php script I run from alarms so I have php in action and the script name in action parms. I suggest you try bash in action and full path to the script in parms, if you put the script in the root cmx directory you should only need the script name. I hasten to add that I've not tried a bash script this way as I normally use php ;)

Stuart

Re: Action on Alarm - how?

Posted: Sat 27 May 2023 8:27 pm
by Ulric2
Thanks for the suggestions. I'll try some different permutations and see if I can get it working.

The first thing I'll try is putting the script in the CumulusMX directory although, I thought providing the full path to the script would do it.

Re: Action on Alarm - how?

Posted: Mon 29 May 2023 6:22 pm
by mcrossley
As you are trying to run a bash script, you should specify "bash" as the executable, and the script (and path if applicable) should be the parameter.