Hi there
I am a recent user of monit and am finding it very useful for
application monitoring with a view to use it with some bespoke
applications and heartbeat. I started with version 4.4 on RedHat Linux
ES3.0.
Using version 4.4 I had everything running fine with services creating
their own pid files via bespoke service scripts. When I forced an
application to fail by removing it's required configuration file, after
2 restarts in 3 cycles the monitoring timed out as expected.
Unfortunately I couldn't get the restart count to reset on unmonitor and
so it was in constant timeout. Hence moving to version 4.5 for the
suggested bugfix in the release note.
I am using exactly the same monitrc file and applications as I used
before but this time I cannot get a service to timeout upon forcing a
failure. Has anything changed within monit? The monitrc looks pretty
much like this
********
set daemon 20 # Poll at 20 second intervals
set logfile syslog facility log_daemon # Set syslog logging
set init
set httpd port 2812
use address localhost
allow localhost
check process monkey with pidfile /var/run/monkey.pid
start program = "/etc/init.d/monkey start"
stop program = "/etc/init.d/monkey stop"
if 2 restarts within 3 cycles then timeout
*********
I was thinking that it may be something to do with the pidfile. The
init script of monkey simply echo's the pid created upon startup to the
/var/run/monkey.pid file although monkey does start in the background
with an &. Not sure what effect this is having upon the pid. Although
it did work in the previous release of monit.
Please find some output below. This same output is repeated forever
without the monitoring timing out
Any advice would be appreciated
Cheers
****************
# /usr/bin/monit -v -Ic /etc/monitrc
monit: Debug: Adding host allow 'localhost' (127.0.0.1).
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 = 20 seconds
Mail server(s) = localhost
Mail from = (not defined)
Mail subject = (not defined)
Mail message = (not defined)
Start monit httpd = True
httpd bind address = localhost
httpd portnumber = 2812
httpd signature = True
Use ssl encryption = False
httpd auth. style = Host/Net allow list
The service list contains the following entries:
Process Name = monkey
Group = (not defined)
Pid file = /var/run/monkey.pid
Monitoring mode = active
Start program = /etc/init.d/monkey start
Stop program = /etc/init.d/monkey stop
Pid = if changed then alert
Ppid = if changed then alert
Timeout = If 2 restart within 3 cycles then unmonitor else
if reco vered then alert
-------------------------------------------------------------------------------
Starting monit daemon with http interface at [localhost:2812]
Starting monit HTTP server at [localhost:2812]
monit HTTP server started
'system' load average [0.00][0.00][0.00]
'system' memory usage 3.6% [131304 kB]
'system' cpu usage 0.0%us 0.0%sy 0.0%wa
'monkey' process is not running
'monkey' trying to restart
Monitoring disabled -- service monkey
'monkey' start: /etc/init.d/monkey
Monitoring enabled -- service monkey
Starting monkey: [ OK ]
'system' load average [0.00][0.00][0.00]
'system' memory usage 3.6% [133032 kB]
'system' cpu usage 1.4%us 0.4%sy 9.9%wa
'monkey' process is not running
'monkey' trying to restart
Monitoring disabled -- service monkey
'monkey' start: /etc/init.d/monkey
Monitoring enabled -- service monkey
Starting monkey: [ OK ]
'system' load average [0.00][0.00][0.00]
'system' memory usage 3.7% [133168 kB]
'system' cpu usage 2.4%us 1.9%sy 9.9%wa
'monkey' process is not running
'monkey' trying to restart
Monitoring disabled -- service monkey
'monkey' start: /etc/init.d/monkey
Monitoring enabled -- service monkey
Starting monkey: [ OK ]
'system' load average [0.00][0.00][0.00]
'system' memory usage 3.7% [133676 kB]
'system' cpu usage 0.9%us 0.4%sy 6.4%wa
'monkey' process is not running
'monkey' trying to restart
Monitoring disabled -- service monkey
'monkey' start: /etc/init.d/monkey
Monitoring enabled -- service monkey
Starting monkey: [ OK ]
=======================================================
Information contained in this email message is intended only for use of
the individual or entity named above. If the reader of this message is
not the intended recipient, or the employee or agent responsible to
deliver it to the intended recipient, you are hereby notified that any
dissemination, distribution or copying of this communication is strictly
prohibited. If you have received this communication in error, please
immediately notify us by email to address@hidden and destroy the
original message.
------------------------------------------------------------------------
--
To unsubscribe:
http://lists.nongnu.org/mailman/listinfo/monit-general