[Top][All Lists]

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

Re: Question about monitrc file.

From: alex
Subject: Re: Question about monitrc file.
Date: Thu, 04 Oct 2007 11:55:31 +0300

   Hi Jovan.
   Thank you for detail answer. But one question you don't explain.
   Can you tell me from where you know about this feature (that heartbeat
don't monitoring scripts from /etc/rc.d/init.d or /etc/init.d)? I haven't
doubts that you are right (but i don't check this yet) but want to see
this fact in official documentation (as you wrote in previouse letter).

   Thank you very much,

Note: httpd and smb are the name of startup scripts for Apache and Samba,
respectively. Heartbeat will look for startup scripts of the same name in
the following paths:

Yes that's right, but leave the /etc/rc.d or /etc/init.d for the
"real" startup scripts ;)
Add the wrapper scripts to /etc/ha.d/resource.d

I've never tried linking the init.d scripts in  /etc/ha.d/resource.d.
Try it it may work.

Here is the wrappers script named ha-mysql that I wrote for
starting/stoping mysql

start() {
      echo -n "Starting : "
      $path_to_exec/$exec_name start &&

stop() {
      echo -n "Shutting down : "
                              killproc $exec_name

case "$1" in
      echo "Usage: $0 {start|stop}"
      exit 1

It is located in /etc/ha.d/resource.d

Now you can add it to the monitrc part which monitors the mysql server
check process mysql_DBserver with pidfile /var/run/mysqld/
start program = "/etc/ha.d/resoruce.d/ha-mysql start"
stop program = "/etc/ha.d/resoruce.d/ha-mysql stop"
if failed host port 3306 then restart
if 2 restarts within 2 cycles then timeout
#if 2 restarts within 2 cycles then exec "/usr/sbin/monit heartbeat stop"
group Inet-Primaire
mode manual

BR, Jovan

СХВАТКА за ADSL.BY началась. В первом отборочном туре сыграло более 2500 человек. Присоединяйтесь!
Заходи на и выигрывай каждый день совершенный интернет!

reply via email to

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