Re: [Mon-devel] upalertafter broken
Brought to you by:
trockij
From: Jim T. <tr...@ar...> - 2007-11-15 18:28:47
|
On Tue, 9 Oct 2007, Wolfram Schlich wrote: > 'upalertafter' is only supported for period definitions, not for > service definitions itself. Despite that fact, process_event() > (mon line 3365) looks for $sref->{"upalertafter"}, which obviously > doesn't exist. correct. this is part of the bug. > A place where the code loops through the periods and where one > could check it is within the do_alert() function. correct again. the upalertafter processing is being handled in the wrong place. a while back i had cleaned up the code to make the trap processing use the same squelch logic as the other processing by putting that in process_event. this fixed some trap bugs, and i had intended to do some more cleanup related to that. so it does appear that the way to fix this is to rip out the decisions to call do_alert from process_event and stick them into do_alert. > Unfortunately, when you place the upalertafter check in there, > it will only be run once, because process_event() already resets sure, just some minor details :) david, have you had a look at this yet, and have you formulated an opinion on this? i'll move on this, but just let us know if you have some ideas. regarding the syslog bug, it's wrapped up in an eval to handle exception processing from deeper levels in Sys::Syslog, and the other gunk in there (the map) is a workaround for a bug in an older version of Sys::Syslog (0.07). the better way to fix this is to have it bail out on startup if the old buggy version is found, and tell people to get a newer version. fwiw, the perl that ships with sles10, fc6, rhel5 all include the newer version. sles8 and sles9 have the buggy version. from the manual: Note "Sys::Syslog" version v0.07 and older passed the $message as the formatting string to "sprintf()" even when no formatting arguments were provided. If the code calling "syslog()" might execute with older versions of this module, make sure to call the function as "syslog($priority, "%s", $message)" instead of "syslog($priority, $message)". This protects against hostile formatting sequences that might show up if $message contains tainted data. |