Maybe this belong to heartbeat maillist, but I have tried there, and I still 
do not know what goes wrong.

I let heartbeat start mon with the following script:

********************
#!/bin/bash

MON=/usr/ha/mon-0.99.2

if [ $1 = "start" ]; then
        $MON/mon -f -c $MON/mon.cf
elif [ $1 = "stop" ]; then
        pid=$(ps -xw|grep $MON/mon.cf|grep -v grep|cut -c 1-5)
        kill $pid
else
        echo 0
fi

exit 0
********************

If I start mon with that script manually, it seems to work allright. But if 
I let heartbeat start mon, it keeps starting new instances of mon!?

Here is my mon.cf:

********************
#
# global options
#
cfbasedir   = /usr/ha/mon-0.99.2/etc
alertdir    = /usr/ha/mon-0.99.2/alert.d
mondir      = /usr/ha/mon-0.99.2/mon.d
maxprocs    = 20
histlength = 100
randstart = 60s

#
# authentication types:
#   getpwnam      standard Unix passwd, NOT for shadow passwords
#   shadow        Unix shadow passwords (not implemented)
#   userfile      "mon" user file
#
authtype = getpwnam

#
# NB:  hostgroup and watch entries are terminated with a blank line (or
# end of file).  Don't forget the blank lines between them or you lose.
#

#
# group definitions (hostnames or IP addresses)
#
hostgroup wwwservers 62.243.245.113

hostgroup ethCard 62.243.245.100

watch wwwservers
    service http
        interval 4m
        monitor http.monitor
        allow_empty_group
        period wd {Sun-Sat}
            alert mail.alert [EMAIL PROTECTED]
            upalert mail.alert -S "web server is back up" 
[EMAIL PROTECTED]
            alertevery 45m

watch ethCard
    service ping
        interval 1m
        monitor fping.monitor
        period wd {Sun-Sat}
            alert heartbeat.alert
********************

And now to the strange (to me anyway) mon stuff. If I comment out the 
ethCard watch, heartbeat only starts one mon instance!?? But heartbeat still 
can't stop mon with my script!?

Any ideas? I really need help on this one.

/S�ren

_________________________________________________________________
MSN Photos is the easiest way to share and print your photos: 
http://photos.msn.com/support/worldwide.aspx

Reply via email to