I'm having an issue with monit's status command output not
matching
what monit is actually doing. As a result, I can't seem to
start/stop/monitor individual processes correct.
Monit is monitoring the processes correctly, but the status
command is
not showing what monit is actually doing and the monit start/stop
commands dont work as well.
I included everything in my /etc/monit.d/* directly from my
/etc/monit.conf file.
I have an /etc/monit.d/delayed_job.monitrc file with the following
contents: (also at http://pastie.org/600803)
check process delayed_job.0 with pidfile
/home/rails/paseweb/shared/pids/delayed_job.0.pid
start program = "/home/rails/paseweb/current/script/delayed_job -e
staging --pid-file=delayed_job.0 start"
stop program = "/home/rails/paseweb/current/script/delayed_job -e
staging --pid-file=delayed_job.0 stop"
group paseweb
check process delayed_job.1 with pidfile
/home/rails/paseweb/shared/pids/delayed_job.1.pid
start program = "/home/rails/paseweb/current/script/delayed_job -e
staging --pid-file=delayed_job.1 start"
stop program = "/home/rails/paseweb/current/script/delayed_job -e
staging --pid-file=delayed_job.1 stop"
group paseweb
check process delayed_job.2 with pidfile
/home/rails/paseweb/shared/pids/delayed_job.2.pid
start program = "/home/rails/paseweb/current/script/delayed_job -e
staging --pid-file=delayed_job.2 start"
stop program = "/home/rails/paseweb/current/script/delayed_job -e
staging --pid-file=delayed_job.2 stop"
group paseweb
The corresponding section in the monit status command gives the
following output:
Process 'delayed_job'
status not monitored
monitoring status not monitored
data collected Mon Aug 31 14:40:42 2009
But if I run "monit -v status", the debugging output at the top
shows
me that monit is processing my delayed_job.monitrc file correctly,
while the status output at the bottom shows something completely
different: (also at http://pastie.org/600806, I've cut out the
extraneous bits for brevity while the pastie contains the full
output)
address@hidden monit.d]$ sudo monit -v status
monit: Debug: Adding host allow 'localhost'
...
The service list contains the following entries:
...
Process Name = delayed_job.0
Group = paseweb
Pid file = /home/rails/paseweb/shared/pids/
delayed_job.0.pid
Monitoring mode = active
Start program =
'/home/rails/paseweb/current/script/delayed_job -e staging
--pid-file=delayed_job.0 start' timeout 30 second(s)
Stop program =
'/home/rails/paseweb/current/script/delayed_job -e staging
--pid-file=delayed_job.0 stop' timeout 30 second(s)
Pid = if changed 1 times within 1 cycle(s) then
alert
Ppid = if changed 1 times within 1 cycle(s) then
alert
Process Name = delayed_job.1
Group = paseweb
Pid file = /home/rails/paseweb/shared/pids/
delayed_job.1.pid
Monitoring mode = active
Start program =
'/home/rails/paseweb/current/script/delayed_job -e staging
--pid-file=delayed_job.1 start' timeout 30 second(s)
Stop program =
'/home/rails/paseweb/current/script/delayed_job -e staging
--pid-file=delayed_job.1 stop' timeout 30 second(s)
Pid = if changed 1 times within 1 cycle(s) then
alert
Ppid = if changed 1 times within 1 cycle(s) then
alert
Process Name = delayed_job.2
Group = paseweb
Pid file = /home/rails/paseweb/shared/pids/
delayed_job.2.pid
Monitoring mode = active
Start program =
'/home/rails/paseweb/current/script/delayed_job -e staging
--pid-file=delayed_job.2 start' timeout 30 second(s)
Stop program =
'/home/rails/paseweb/current/script/delayed_job -e staging
--pid-file=delayed_job.2 stop' timeout 30 second(s)
Pid = if changed 1 times within 1 cycle(s) then
alert
Ppid = if changed 1 times within 1 cycle(s) then
alert
...
-------------------------------------------------------------------------------
The Monit daemon 5.0 uptime: 2d 23h 11m
...
Process 'delayed_job'
status not monitored
monitoring status not monitored
data collected Mon Aug 31 14:40:42 2009
...
Any ideas? I know monit is handling my jobs correctly because
they
are all start and run fine.
- Craig
--
To unsubscribe:
http://lists.nongnu.org/mailman/listinfo/monit-general