Hi all,
I just compiled monit from CVS because I wanted to test the new URL and HTTP
content monitoring feature.
I use monit to monitor two services (aaa and bbb) and restart them max two
times. If that happens I want to switch over to standby system (by stopping
heartbeat, monit was started before by heartbeat..I know, the manual tells me
to do it the other way around...but I want it that way).
As long as the "Event ratio dependant action rules" are not yet supported I will do a
workaround monitoring the monit service pages for the words "not monitored" (ccc_mont and
ddd_monit).
Unfortunately monit crashes.
/etc/init.d/monit status gives me a "monit dead but pid file exists".
Last line of monit.log is: monit HTTP server started"
I also tried to use monit -c /etc/monit.conf -v. This one started monit (with
all the debug messages), but also crashed after some seconds.
I attached my config as well.
I'm no developer, just user.
Thanks,
Bernhard
***************************************************
set daemon 30
set logfile /var/log/monit.log
set mailserver localhost
set mail-format
{ from: address@hidden
set alert address@hidden
set httpd port 2812 and
allow localhost
allow 192.168.9.41
allow 192.168.10.171
#------services to
watch-----------------------------------------------------------
check host aaa with address 127.0.0.1
start program = "/etc/init.d/ABC start"
stop program = "/etc/init.d/ABC stop"
if failed port 20001 with timeout 60 seconds then restart
if 2 restarts within 20 cycles then timeout
check host bbb with address 192.168.10.173
start program = "/etc/init.d/DEF start"
stop program = "/etc/init.d/DEF stop"
if failed host 192.168.10.173 port 8080 protocol http with timeout 60
seconds then restart
if 2 restarts within 20 cycles then timeout
#-----use mont http content feature to check for "not monitored" -------
check host ccc_monit with address 192.168.10.173
if failed url http://192.168.10.173:2812/aaa
and content != "not monitored" with timeout 60 seconds
then exec "/etc/init.d/heartbeat stop"
check host ddd_monit with address 192.168.10.173
if failed url http://192.168.10.173:2812/bbb
and content != "not monitored" with timeout 60 seconds
then exec "/etc/init.d/heartbeat stop"
***************************************************************************************************
The information in this email is confidential and may be legally privileged.
Access to this email by anyone other than the intended addressee is
unauthorized. If you are not the intended recipient of this message, any
review, disclosure, copying, distribution, retention, or any action taken or
omitted to be taken in reliance on it is prohibited and may be unlawful. If
you are not the intended recipient, please reply to or forward a copy of this
message to the sender and delete the message, any attachments, and any copies
thereof from your system.
***************************************************************************************************
--
To unsubscribe:
http://lists.nongnu.org/mailman/listinfo/monit-general