Gotcha. I threw that in, and it seems to work correctly, except I can't tell if it is or not. I'm watching the log file, and it shows alerts being sent on an up/down event, but I'm not seeing alerts every 15s showing up when things are working correctly. Is that expected behavior?
Thanks, Tim -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of David Nolan Sent: Thursday, July 13, 2006 7:06 AM To: mon@linux.kernel.org Subject: Re: Problem getting traps to work correctly --On Wednesday, July 12, 2006 16:30:08 -0500 Tim Carr <[EMAIL PROTECTED]> wrote: > > When mainmonitor gets one of the traps, I'll see this in > /var/log/messages: > > > > Jul 11 16:20:04 monitor mon[2017]: trap received for undefined service > type default/DRBD_Status > > > > ...but nothing will actually get kicked off and no mail is sent. Also, > the mon.cgi program (running on mainmonitor) will stay in the > blue/unchecked status. > Looks like you've found a logic bug. The code to set the group & service in handle_trap to default/default has an error which causes it to set the group but never the service. I just commited a fix for this to CVS. > > Jul 11 16:24:49 monitor mon[2017]: trap trap 0 from grp=default > svc=DRBD_Status, sta=0 > In this case you're not getting an alert because the status bit of the trap is set to 0, which is the OK status. It looks like the remote.alert in CVS was never updated when Mon starting using that field. trap.alert was rewritten... Since these two alerts server the same purpose I'm going to remove remote.alert from CVS. > Any thoughts as to what's going on here? I'm trying to get this > working: > > - An alert getting kicked off by the mainmonitor's system when it > receives a trap; and > > - The mon.cgi program on mainmonitor showing an alert status once > its received that trap. > BTW, you might want to use the 'redistribute' config parameter for your traps, that will cause all status updates to propagate to your main mon server. That way you can see when the last test occurred at all times. >From the current Mon manpage (in CVS): redistribute alert [arg...] A service may have one redistribute option, which is a special form of an an alert definition. This alert will be called on every service status update, even sequential success status updates. This can be used to integrate Mon with another monitoring system, or to link together multiple Mon servers via an alert script that generates Mon traps. -David _______________________________________________ mon mailing list mon@linux.kernel.org http://linux.kernel.org/mailman/listinfo/mon _______________________________________________ mon mailing list mon@linux.kernel.org http://linux.kernel.org/mailman/listinfo/mon