monit-general
[Top][All Lists]
Advanced

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

[monit] Launching problem using dependent program


From: Vianney Lejeune
Subject: [monit] Launching problem using dependent program
Date: Wed, 25 Feb 2009 22:37:19 +0100

Hello,

I have a problem running monit 4.8.1 using mysql and freeradius on Debian Etch. Sometimes mysql takes some time to check the tables while freeradius tries to start, which leads to an database access error from freeradius. What can I do to launch freeradius once mysql has checked the table ?

This is a sample of my monitrc:

==>
check process mysql_DBserver with pidfile /var/run/mysqld/mysqld.pid
   depends on heartbeat
start program = "/bin/bash -c '/etc/init.d/mysql start; touch /etc/ monit/.mysql_restarted'"
   stop program = "/etc/init.d/mysql stop"
   if failed host 127.0.0.1 port 3306 then restart
if failed host 127.0.0.1 port 3306 for 3 times within 3 cycles then exec "/usr/lib/heartbeat/hb_standby"
   #if 4 restarts within 4 cycles then timeout
   group Inet-Primaire
   mode manual
check file .mysql_restarted with path "/etc/monit/.mysql_restarted"
   depends on mysql_DBserver
if changed timestamp for 3 cycles then exec "/usr/lib/heartbeat/ hb_standby"
   group Inet-Primaire
   mode manual


check process freeradius_auth_server with pidfile /var/run/freeradius/ freeradius.pid
    depends on mysql_DBserver, heartbeat
start program = "/bin/bash -c '/etc/init.d/freeradius start; touch /etc/monit/.freeradius_restarted'"
    stop  program = "/etc/init.d/freeradius stop"
   if failed port 1812 type udp then restart
if failed port 1812 type udp for 3 times within 3 cycles then exec "/usr/lib/heartbeat/hb_standby"
   #if 4 restarts within 4 cycles then timeout
   group Inet-Primaire
   mode manual
check file .freeradius_restarted with path "/etc/ monit/.freeradius_restarted"
   depends on freeradius_auth_server
if changed timestamp for 3 cycles then exec "/usr/lib/heartbeat/ hb_standby"
   group Inet-Primaire
   mode manual
<==

Regards,
Mr Lejeune




reply via email to

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