I tried the same thing sir from the exec directly as
exec "/bin/bash /etc/rc.d/init.d/heartbeat stop"
but it is not working might be i m missiong something in the
configuration please have a look to it
it is as follwos
/etc/monitrc
set daemon 5 # Poll at 5 seconds intervals
set logfile syslog facility log_daemon
set alert address@hidden
set httpd port 2812 and use address 192.168.13.55
allow 192.168.7.51
allow 192.168.1.114 # Allow localhost to connect
allow admin:monit # Allow Basic Auth
check process mysql with pidfile /var/lib/mysql/manage.pid
start program = "/etc/ha.d/resource.d/sqld start"
stop program = "/etc/ha.d/resource.d/sqld stop"
if changed pid
then EXEC "/etc/test.sh"
if failed host 127.0.0.1 port 3306 protocol mysql
then EXEC "/etc/test.sh"
please hlep me
even it sends an alert to address@hidden
but i m unable to get the script executed over here itself may i have
your attention please sir ...
thanks for your guidence and anticipating your help
regards
Rushiraj
----- Original Message -----
From: <address@hidden>
To: <address@hidden>
Sent: Tuesday, May 23, 2006 11:59 AM
Subject: monit-general Digest, Vol 40, Issue 15
Send monit-general mailing list submissions to
address@hidden
To subscribe or unsubscribe via the World Wide Web, visit
http://lists.nongnu.org/mailman/listinfo/monit-general
or, via email, send a message with subject or body 'help' to
address@hidden
You can reach the person managing the list at
address@hidden
When replying, please edit your Subject line so it is more specific
than "Re: Contents of monit-general digest..."
Today's Topics:
1. EXEC not working Help Help Help ..... (rushi)
2. Re: EXEC not working Help Help Help (Jan-Henrik Haukeland)
----------------------------------------------------------------------
Message: 1
Date: Tue, 23 May 2006 10:26:03 +0530
From: "rushi" <address@hidden>
Subject: EXEC not working Help Help Help .....
To: <address@hidden>
Message-ID: <address@hidden>
Content-Type: text/plain; charset="iso-8859-1"
Skipped content of type multipart/mixed-------------- next
part --------------
------------------------------------
eLitecore Technologies Ltd
------------------------------
Message: 2
Date: Tue, 23 May 2006 08:45:12 +0200
From: Jan-Henrik Haukeland <address@hidden>
Subject: Re: EXEC not working Help Help Help
To: This is the general mailing list for monit
<address@hidden>
Message-ID: <address@hidden>
Content-Type: text/plain; charset="us-ascii"
On 23. mai. 2006, at 05.55, rushi wrote:
well the expected behaviour of the monit should be that it should
atleast
execute the script test.sh
the script is like this TEST.SH
I assume that TEST.SH contains this line here
/etc/rc.d/init.d/heartbeat stop
The reason this fails is that a script must begin with #! and the
remainder of the first line must specify an interpreter for the
program. E.g. #!/bin/sh. This is also mentioned in the manual. BTW
why not call the heartbeat script directly from exec?
--
Jan-Henrik Haukeland
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 2367 bytes
Desc: not available
Url :
http://lists.gnu.org/pipermail/monit-general/attachments/20060523/3b5942ec/smime.bin
------------------------------
_______________________________________________
monit-general mailing list
address@hidden
http://lists.nongnu.org/mailman/listinfo/monit-general
End of monit-general Digest, Vol 40, Issue 15
*********************************************
--------------------------------------------------------------------------------
------------------------------------
eLitecore Technologies Ltd