[Top][All Lists]

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

Script works but not very happy

From: Stratos Misinezis
Subject: Script works but not very happy
Date: Tue, 16 Nov 2004 10:50:39 +0200

Hi List and Andreas
Thanks for reply....

Here is the script that works for me..........

set daemon  5
set logfile /var/log/monit
set httpd port 2812 address allow monit:monit
set mailserver localhost
set alert address@hidden

check device rootfs with path /
if space usage > 99% then alert
if inode usage > 99% then alert

check host ha1 with address
if failed icmp type echo with timeout 5 seconds 
          then exec "/etc/init.d/heartbeat stop"
          alert address@hidden

#check process httpd with pidfile /var/run/
#start program = "/etc/init.d/httpd start"
#stop program  = "/etc/init.d/httpd stop"

#alert address@hidden

#check process heartbeat with pidfile /var/run/
#start program = "/etc/init.d/heartbeat start"
#stop program = "/etc/init.d/heartbeat stop"
if failed host port 80 then exec "/etc/init.d/heartbeat stop"
#alert address@hidden

for some strange reason if I take out the lines from the script refuses to work.
The idea is to monit (on my one node) to ping to my virtual IP address
and if it finds out that  does not reply to stop heartbeat as well. It
works ok...but then the echo with 5 seconds is too long......need to
press 5-6 times F5 on my web page before I see the other node to come
up. Strange, when I lower the value....of 5 to 1 for example see that
the heartbeat service goes up and down.....

Any ideas to make it more efficiently?

Thanks in advance

On Mon, 15 Nov 2004 19:29:26 +0100, Andreas Rust <address@hidden> wrote:
> At 12:01 15.11.2004, you wrote:
> >Hi List.
> >I am afraid I have not managed all over the weekend to fix a script
> >when my httpd service goes down the heartbeat service to go down as
> >well in my active node cluster. So if you please help me or at least
> >show me some guidelines....the presentation and your configuration
> >examples are very useful and understandable I manage to monitor a lot
> >of processes but I cannot manage to stop the specific service....
> >Thanks in advance
> Hello,
> since you asked a few times now, maybe a good idea would be to post some
> config snippet which you tried
> along with whatever didn't work out.
> I assume you want your heartbeat go down after monit has tried to restart
> httpd for several times.
> Therefore simply exec the heartbeat stop script on error ?
> l8r
>      Andreas Rust     -   webnova GmbH
>      address@hidden  -
>      Tel:  +49 (0)700 - 20 30 7000
>      Fax:  +49 (0)700 - 20 30 8000
> +:----------------------------------------------------------:+
>           Gemeinsam sind wir stark...

reply via email to

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