[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[monit-dev] Forked project on github.com and added a "set exec" feature
From: |
Andrew Forward |
Subject: |
[monit-dev] Forked project on github.com and added a "set exec" feature |
Date: |
Thu, 28 Jul 2011 11:32:20 -0400 |
I forked the monit project and put up my changes on
github.com.
I was looking for a feature similar to the one requested below:
"What I would like to do is: whenever I type "alert", send an e-mail AND run a certain script."
I am not a C/C++ developer so the implementation if very simplistic and not fault tolerant as shown in the implementation of "exec" when running things like "if failed... then exec".
The patches are available at:
Here is how the "limited" feature works.
You can set a global exec, just like you can set a global alert
set exec "/usr/local/bin/myscript '$SERVICE: $EVENT'"
Within the script, you can use the same variables as you can with emails (e.g. $EVENT). With the line above, whenever an alert is executed it will also check to see if an exec should be executed and will run it. Again, the implementation is very naive as I simply needed to get something to work. Feedback on improving it and / or helping to integrate back into the core would be great, but if not, we will continue to maintain our fork and integrate changes with SVN on a periodic basis.
--
aforward
- [monit-dev] Forked project on github.com and added a "set exec" feature,
Andrew Forward <=