monit-general
[Top][All Lists]
Advanced

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

Re: [monit] status command output is incorrect


From: Martin Pala
Subject: Re: [monit] status command output is incorrect
Date: Mon, 31 Aug 2009 22:10:53 +0200

Hello,

the "monit status" output shows, that the service monitoring was disabled - to enable it again, use: "monit monitor delayed_job.0".

The reason why the service is not monitored should be in log file (most probably user action).

Martin


On Aug 31, 2009, at 9:50 PM, Craig Jolicoeur wrote:

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





reply via email to

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