[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Misleading info
From: |
Martin Pala |
Subject: |
Re: Misleading info |
Date: |
Sat, 12 Feb 2005 12:01:21 +0100 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.5) Gecko/20050105 Debian/1.7.5-1 |
Chris Lopeman wrote:
> The command line status command produces misleading information. I
have
some processes setup to monitor every 8 cycles. Yet as each cycle
passes monit tells me that it just collected the data on that process.
That can't be true because nothing has updated its status. For example
when I restart the process, it immediately changes to "initializing".
It remains at that status for the next 8 cycles. But the data collect
timestamp is updated 7 times.
This is correct. When the monitoring is enabled, but the data were not
collected yet, monit reports the state as 'initializing'. The timestamp
is updated each validation cycle, regardless the service test cycle offset.
The state is valid, the 'data collected' timestamp serves as the
acknowledge of when the last cycle was passed.
This is good to know because the testing runs in one thread => the cycle
length is variable and depends on particular tests timeframe. When monit
waits for some test to timeout (for example wait for 5s before marking
connection as dead for some service), there is skew between cycles. The
timestamp then allows to see the testing progress and confirms that in
the given time the state is as it is. This granularity is also important
for graphing.
In your case the service test was realy skipped for 8 cycles => the
service remains correctly on 'initializing' state (because it was not
touched by monit) until this offset passed.
Speaking of that new status formats. It would be nice if there was a
command line flag to view that status in a more compressed form, like
the old monit.
This feature is planned for some future release. It should display just
few informations - probably service state only (?), for example:
--8<--
address@hidden monit summary
Process 'slapd'
status Does not exist
Process 'mysql'
status Does not exist
File 'slapd_rc'
status initializing
File 'slapd_bin'
status initializing
Device 'rootfs'
status accessible
Device 'vfatfs'
status Data access error
File 'testfile'
status accessible
Directory 'bin'
status accessible
Remote Host 'iol'
status online with all services
--8<--
Note that if you need such feature now, you can easily filter the 'monit
status' output as needed, for example using awk:
--8<--
unicorn:~/cvs/monit# ./monit status 2>/dev/null| awk '/\x27/ {print;
getline; print}'
System 'unicorn'
load average [0.05] [0.05] [0.01]
Process 'slapd'
status Execution failed
Process 'mysql'
status running
File 'slapd_rc'
status initializing
File 'slapd_bin'
status initializing
Device 'rootfs'
status accessible
Device 'vfatfs'
status Data access error
File 'testfile'
status accessible
Directory 'bin'
status accessible
Remote Host 'iol'
status online with all services
--8<--
Martin