|
From: | Chris Lopeman |
Subject: | Re: Misleading info |
Date: | Sun, 13 Feb 2005 15:56:33 -0600 |
User-agent: | Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.2) Gecko/20040804 Netscape/7.2 (ax) |
Martin Pala wrote:
Chris Lopeman wrote:> The command line status command produces misleading information. I havesome 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.
I can argue a lot of this. but let's keep it to the point. Ther was not data collected for that process at that time. The pid was not read. The process was not checked to be running. An attempt to connect to the service was not made. Therefore not data what so ever was collected. At minimum the label should be changed. Maybe "Last Cycle Pass".
Thanks for listening, Chris
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 -- To unsubscribe: http://lists.nongnu.org/mailman/listinfo/monit-general
[Prev in Thread] | Current Thread | [Next in Thread] |