Re: [Mon-devel] _last_checked?
Brought to you by:
trockij
From: Jim T. <tr...@tr...> - 2004-07-06 15:21:47
|
On Tue, 6 Jul 2004, David Nolan wrote: > So, changing proc_cleanup() to set _next_check when a monitor script exits > will only result in the timestamp passed to Mon clients being when the > script exited instead of when it was started. But when it exited is > actually already available as either _last_success or _last_failure. But > having _last_check be when the script was started might be interesting for > purposes of calculating how long mon scripts are taking to run. > I'd lean towards deleting the line from proc_cleanup. better yet, just make that line be this instead: $sref->{"_monitor_duration"} = $tmnow - $sref->{"_last_check"}; and make this change in client_write_opstatus: $buf .= " interval=$sref->{interval}" . " monitor_duration=$sref->{_monitor_duration}" if ($sref->{"interval"}); then you can get that "how long did it run" info if you want. afaik nobody has requested that feature, but i can see how it could be useful if you're trying to tune your config or if you are debugging something monitor-related. |