monit-general
[Top][All Lists]
Advanced

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

EXEC not working Help Help Help .....


From: rushi
Subject: EXEC not working Help Help Help .....
Date: Tue, 23 May 2006 10:26:03 +0530

I  am explaining the whole senario

I am using the monit version 4.8.1 in tar.gz format after making it dependent with linux 7.2 and using it with the follwing script i have also attached the test.sh and the monitrc script that i am using to do exec


the exec is not working even after running the monit in verbose mode i am only getting that it is trying to send an alert not the EXEC part


so what i need to do execute the exec part



well the    MONITRC is

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"



the test.sh TEST.SH is


/etc/rc.d/init.d/heartbeat stop

the out put of the MONIT with command monit -vI is as following



the output is as follwing

address@hidden /etc]# monit -vI
monit: Debug: Adding net allow '192.168.7.51'.
monit: Debug: Adding net allow '192.168.1.114'.
monit: Debug: Adding credentials for user 'admin'.
Runtime constants:
Control file       = /etc/monitrc
Log file           = syslog
Pid file           = /var/run/monit.pid
Debug              = True
Log                = True
Use syslog         = True
Is Daemon          = True
Use process engine = True
Poll time          = 5 seconds
Mail server(s)     = localhost
Mail from          = (not defined)
Mail subject       = (not defined)
Mail message       = (not defined)
Start monit httpd  = True
httpd bind address = 192.168.13.55
httpd portnumber   = 2812
httpd signature    = True
Use ssl encryption = False
httpd auth. style  = Basic Authentication and Host/Net allow list
Alert mail to      = address@hidden
  Alert on         = All events

The service list contains the following entries:

Process Name          = mysql
Pid file             = /var/lib/mysql/manage.pid
Monitoring mode      = active
Start program        = /etc/ha.d/resource.d/sqld start
Stop program         = /etc/ha.d/resource.d/sqld stop
Pid                  = if changed 1 times within 1 cycle(s) then exec
Ppid                 = if changed 1 times within 1 cycle(s) then alert
Port = if failed 127.0.0.1:3306 [MYSQL via TCP] with timeout 5 seconds 1 times within 1 cycle(s) then exec else if passed 1 times within 1 cycle(s) then alert

System Name           = manage
Monitoring mode      = active

-------------------------------------------------------------------------------
monit: pidfile '/var/run/monit.pid' does not exist
Starting monit daemon with http interface at [192.168.13.55:2812]
Starting monit HTTP server at [192.168.13.55:2812]
monit HTTP server started
Monit started
Monit instance changed notification is sent to address@hidden
'mysql' zombie check passed [status_flag=0000]
'mysql' succeeded connecting to INET[127.0.0.1:3306] via TCP
'mysql' succeeded testing protocol [MYSQL] at INET[127.0.0.1:3306] via TCP
Monit has not changed
monit: pidfile '/var/lib/mysql/manage.pid' does not exist
'mysql' process is not running
Does not exist notification is sent to address@hidden
'mysql' trying to restart
Monitoring disabled -- service mysql
monit: pidfile '/var/lib/mysql/manage.pid' does not exist
monit: pidfile '/var/lib/mysql/manage.pid' does not exist
'mysql' start: /etc/ha.d/resource.d/sqld
monit: pidfile '/var/lib/mysql/manage.pid' does not exist
monit: pidfile '/var/lib/mysql/manage.pid' does not exist
Monitoring enabled -- service mysql
Starting mysqld daemon with databases from /var/lib/mysql
060523 10:28:10  mysqld ended

monit: pidfile '/var/lib/mysql/manage.pid' does not exist
monit: pidfile '/var/lib/mysql/manage.pid' does not exist
monit: pidfile '/var/lib/mysql/manage.pid' does not exist
monit: pidfile '/var/lib/mysql/manage.pid' does not exist
monit: pidfile '/var/lib/mysql/manage.pid' does not exist
'mysql' process is not running
'mysql' trying to restart
Monitoring disabled -- service mysql
monit: pidfile '/var/lib/mysql/manage.pid' does not exist
monit: pidfile '/var/lib/mysql/manage.pid' does not exist
'mysql' start: /etc/ha.d/resource.d/sqld
monit: pidfile '/var/lib/mysql/manage.pid' does not exist
monit: pidfile '/var/lib/mysql/manage.pid' does not exist
'mysql' failed to start
Execution failed notification is sent to address@hidden
monit: pidfile '/var/lib/mysql/manage.pid' does not exist
Monitoring enabled -- service mysql
Starting mysqld daemon with databases from /var/lib/mysql
'mysql' started
Execution succeeded notification is sent to address@hidden
'mysql' process is running with pid 10747
Exists notification is sent to address@hidden
'mysql' zombie check passed [status_flag=0000]
'mysql' succeeded connecting to INET[127.0.0.1:3306] via TCP
'mysql' succeeded testing protocol [MYSQL] at INET[127.0.0.1:3306] via TCP
'mysql' zombie check passed [status_flag=0000]
'mysql' PID has not changed since last cycle
'mysql' PPID has not changed since last cycle
'mysql' succeeded connecting to INET[127.0.0.1:3306] via TCP
'mysql' succeeded testing protocol [MYSQL] at INET[127.0.0.1:3306] via TCP




----- Original Message ----- From: <address@hidden>
To: <address@hidden>
Sent: Tuesday, May 23, 2006 9:10 AM
Subject: monit-general Digest, Vol 40, Issue 14


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. Re: monit-general Digest, Vol 40, Issue 13 (rushi)
  2. EXEC not working Help Help Help (rushi)


----------------------------------------------------------------------

Message: 1
Date: Tue, 23 May 2006 09:23:46 +0530
From: "rushi" <address@hidden>
Subject: Re: monit-general Digest, Vol 40, Issue 13
To: <address@hidden>
Message-ID: <address@hidden>
Content-Type: text/plain; charset="iso-8859-1"

the version is monit4.8.1 i have installed tar.gz with linux 7.2 after
excluding the dependencies


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

/etc/rc.d/init.d/heartbeat stop


The MONITRC is

set daemon 5 # Poll at 5 seconds intervals
set logfile syslog facility log_daemon
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"



but it is not executing that exec part

even i tried with other options that has been given in the site
configuration examples with snmp pop3 sendmail etc but anywhere the EXEC
part is not working



may i know the reason



well help me its urgent.....


if i can have your chat id or something else it would help me a lot .... .




regards,
Rushiraj


----- Original Message ----- From: <address@hidden>
To: <address@hidden>
Sent: Monday, May 22, 2006 9:21 PM
Subject: monit-general Digest, Vol 40, Issue 13


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 ..... (Martin Pala)
  3. Re: Setting Mailserver with diferents time outs
     (Jan-Henrik Haukeland)


----------------------------------------------------------------------

Message: 1
Date: Mon, 22 May 2006 17:39:13 +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/related-------------- next
part --------------
------------------------------------
eLitecore Technologies Ltd

------------------------------

Message: 2
Date: Mon, 22 May 2006 15:16:25 +0200
From: Martin Pala <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; format=flowed

Hi,

1.) which monit version is it?

2.) what is expted behavior and what is wrong with exec?

3.) please run monit in verbose mode: "monit -vI", replicate the state
where you expect EXEC to be performed and send use the output

4.) please attach the mentioned /etc/test.sh

Thanks,
Martin


rushi wrote:
please help me out i am  working on monit since last three days and not
getting the EXEC work my configuration file 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.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"



plese somebody help me out




waiting for the earliest reply...



<http://elitecore.com> Impossible itself Says I M Possible


*Rushiraj Rathod*
/Software Engineer/ *Elitecore Technologies*
904,Silicon Towers,
Off. C.G.Road,
Ahmedabad 380006
address@hidden <mailto:address@hidden>
tel:
fax:
mobile: +91 79 2640 5600 #270
+91 79 2640 7640
+91 98981 96971



/Add me to your address book.../
<https://www.plaxo.com/add_me?u=47245968310&v0=2634698&k0=1301551471&v1=2634699&k1=587599293>
/Want a signature like this?/ <http://www.plaxo.com/signature>


------------------------------------------------------------------------

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


------------------------------------------------------------------------

--
To unsubscribe:
http://lists.nongnu.org/mailman/listinfo/monit-general




------------------------------

Message: 3
Date: Mon, 22 May 2006 16:32:07 +0200
From: Jan-Henrik Haukeland <address@hidden>
Subject: Re: Setting Mailserver with diferents time outs
To: This is the general mailing list for monit
<address@hidden>
Message-ID: <address@hidden>
Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed


On 19. mai. 2006, at 19.15, hans wrote:

I am using Monit 4.8.1 on RHEL ES release 4.
I have been reading the documentation and it didn't say it or meaby i
dont understand.. which its posible.... It isnt posible set up two or
more mailservers with a specific timeout?. i tried it, but it didnt
workout.

That's right. The timeout is optionally added to the end of the mail
server list and apply to all servers. This is what we try to say here
in the manual;

 SET MAILSERVER {host name [PORT port]|ip-address [PORT port]}+
                [with TIMEOUT X SECONDS]

--
Jan-Henrik Haukeland
Mobil +47 97141255





------------------------------

_______________________________________________
monit-general mailing list
address@hidden
http://lists.nongnu.org/mailman/listinfo/monit-general


End of monit-general Digest, Vol 40, Issue 13
*********************************************



--------------------------------------------------------------------------------


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

-------------- next part --------------
------------------------------------
eLitecore Technologies Ltd

------------------------------

Message: 2
Date: Tue, 23 May 2006 09:25:32 +0530
From: "rushi" <address@hidden>
Subject: EXEC not working Help Help Help
To: <address@hidden>, <address@hidden>
Message-ID: <address@hidden>
Content-Type: text/plain; charset="iso-8859-1"

Skipped content of type multipart/related-------------- next part --------------
------------------------------------
eLitecore Technologies Ltd

------------------------------

_______________________________________________
monit-general mailing list
address@hidden
http://lists.nongnu.org/mailman/listinfo/monit-general


End of monit-general Digest, Vol 40, Issue 14
*********************************************



--------------------------------------------------------------------------------


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

Attachment: monitEXEC.txt
Description: Text document

Attachment: monitrc.txt
Description: Text document

Attachment: test.sh
Description: Binary data

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

reply via email to

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