monit-general
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[monit] Re: File check with execution of a script


From: Julian Thomé
Subject: [monit] Re: File check with execution of a script
Date: Sun, 28 Sep 2008 21:12:10 +0200
User-agent: Thunderbird 2.0.0.17 (X11/20080925)

Hi Martin,
Thank you :-)

Julian Thomé

* Martin Pala [27.09.2008]
...

=> the behavior is given by current monit limitation. We plan to improve the dependency behavior and use the result of the full service check in the action chain, which will solve your problem.

The workaround could be to modify your scripts this way ... for example monit_dep.sh:
--8<--
#!/bin/bash

#
# WORKAROUND FOR MONIT DEPENDENCY ACTION CHAIN
#
if test -f /etc/monit/monit_dep.txt; then exit 0; fi

case $1 in
     start)
             touch /etc/monit/monit_dep.txt
             echo "asdfasdfasdfasdf" > /etc/monit/monit_dep.txt
             echo "monit start" >> /etc/monit/hier.txt
             ;;
     stop)
             echo "monit stop" >> /etc/monit/hier.txt
             ;;
esac
--8<--



Thanks,
Martin







___________________________________________________________
Der fr�he Vogel f�ngt den Wurm. Hier gelangen Sie zum neuen Yahoo! Mail: 
http://mail.yahoo.de





reply via email to

[Prev in Thread] Current Thread [Next in Thread]