monit-general
[Top][All Lists]
Advanced

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

got things worked thanks jan....


From: rushi
Subject: got things worked thanks jan....
Date: Wed, 24 May 2006 12:29:38 +0530


-----
Hi Jan

I have got it work the problem was that i was doing to see where it is cheking for mysql i was firing a \

killall mysqld


which was even removing the pid file so it was creating a new process and i was not getting my things work .

now as i am killing only the child the things are working quite easily ..


thanks for guidence and tell me where there is any condition when the pid file is removed i can have a seperate alert or i need to monitor the file itself as a seprate resource ... what i m doing it righ now

the monitrc is as below




set daemon 5 # Poll at 5 seconds intervals
set logfile syslog facility log_daemon
set httpd port 2812 and use address 192.168.13.56
    allow 192.168.7.51
    allow 192.168.1.114 # Allow localhost to connect

    allow admin:monit # Allow Basic Auth


check file sqlpid with path /var/run/mysqld/mysqld.pid
               if size = 0 Byte

then exec "/bin/bash /etc/init.d/heartbeat stop" and unmoniter
check process mysql with pidfile /var/run/mysqld/mysqld.pid
#group database
        start program = "/etc/init.d/mysqld start"
       stop program = "/etc/init.d/mysqld stop"
if failed  port 3306 type tcp
then EXEC "/bin/echo MYSQL PORT FAILURE UNABLE TO TELNET"
if changed pid
then EXEC "/bin/echo MYSQL PROCESS ID HAS BEEN CHANGED"
if changed ppid
                       then EXEC "/bin/echo  PARENT PID HAS BEEN CHANGED "

if 5 restarts within 5 cycles
                       then timeout and

check process xinetd with pidfile /var/run/xinetd.pid

if failed port 21 type tcp
               then EXEC "/bin/echo THIS IS HIGH AVAILABILITY TEST ON FTP"
~
~


regards
Rushiraj


----- Original Message ----- From: "rushi" <address@hidden>
To: <address@hidden>
Sent: Tuesday, May 23, 2006 12:38 PM
Subject: Re: monit-general Digest, Vol 40, Issue 15


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



------------------------------------
eLitecore Technologies Ltd

reply via email to

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