On Wed, Oct 10, 2001 at 08:15:34AM +0200, Dietmar Goldbeck wrote: > On Mon, Oct 08, 2001 at 12:52:39PM +1000, Steve Micallef wrote: > > Hi all, > > > > I've come across a problem in using mon, specifically to do with the > > receiving of Up alerts. > > > > My mon configuration: > > > > [ snip ] > > You cannot have multiple alert/upalert entries within one period. > But it is fine to have several _named_ period definitions. > Here is an example from our mon.cf:
Then why this from the man page? alert alert [arg...] A period may contain multiple alerts, which are triggered upon failure of the service. An alert is specified with the alert keyword, followed by an optional exit parameter, and arguments which are interpreted the same as the monitor definition, but without the ";;" exception. The exit parameter takes the form of exit=x or exit=x-y and has the effect that the alert is only called if the exit status of the monitor script falls within the range of the exit parameter. If, for example, the alert line is alert exit=10-20 mail.alert mis then mail-alert will only be invoked with mis as its arguments if the monitor program's exit value is between 10 and 20. This feature allows you to trigger different alerts at different severity levels (like when free disk space goes from 8% to 3%). upalert alert [arg...] An upalert is the compliment of an alert. An upalert is called when a services makes the state transition from failure to success, if a corresponding "down" alert was previously sent. The upalert script is called supplying the same parameters as the alert script, with the addition of the -u parameter which is simply used to let an alert script know that it is being called as an upalert. Multiple upalerts may be specified for each period definition. Set the per-period no_comp_alerts option to send an upalert regardless if whether or not a "down" alert was sent. I read the man pages carefully and use multiple alerts and upalerts in the same period definitions after seeing that it's supported. I did find that I couldn't rely on the upalerts and downalerts working properly for cases like yours. I ended up having a bunch of hostgroups with a single host in them. I couldn't chance getting missing/mismatched up and down alerts when the scripts take hosts in and out of service in load balancers and fix IIS on broken NT boxes. My solution works _very_ well, but mon.cgi isn't as pretty when there are so many groups ;) Oh well I get paid for uptime, not pretty mon.cgi pages. > Of course it would be nice, if the mon server would accept your > configuration too. It certainly should if the man page says it should. -- Nate Campi <[EMAIL PROTECTED]> GnuPG key: 0xC17AEF79 http://www.campin.net He is now rising from affluence to poverty. -- Mark Twain
