global event handlers firing sporadically in 1 .1

Dan Hopkins dan.hopkins at uk.easynet.net
Tue Mar 23 12:00:17 CET 2004


The service level event handlers are all disabled (at least I assuming
default value is disabled - the docs aren't explicit, but this would make
sense with no event_handler defined or inherited)

grep -c event_handler /usr/local/etc/nagios/services.cfg 
0

I can try turning on event_handler_enabled in each service definition - but
I would be more inclined to suspect this if the global event handler *never*
worked. This intermittent thing is weird.

Thanks,
-- 
Dan Hopkins
Systems Developer, easynet Ltd.

> -----Original Message-----
> From: Andreas Ericsson [mailto:ae at op5.se]
> Sent: 23 March 2004 10:42
> To: 'nagios-users at lists.sourceforge.net'
> Subject: Re: [Nagios-users] global event handlers firing 
> sporadically in
> 1 .1
> 
> 
> Silly question, maybe, but is enable_event_handlers 
> explicitly set to 1 
> in all templates that these hosts and services use?
> If I remember the code correctly, lower 'levels' of 
> configuration have 
> first priority in a 'laziest possible' way (nagios won't do 
> anything if 
> any of the levels it has to check tells it not to).
> 
> Cheers,
> Sourcerer / Andreas Ericsson
> 
> Dan Hopkins wrote:
> >>-----Original Message-----
> >>From: Dan Hopkins [mailto:dan.hopkins at uk.easynet.net]
> >>Sent: 18 March 2004 09:54
> >>To: 'nagios-users at lists.sourceforge.net'
> >>Subject: [Nagios-users] global event handlers firing 
> >>sporadically in 1.1
> >>
> >>
> >>Has anyone experienced global event handlers being skipped 
> >>(nagios 1.1)?
> >>
> >>We've got two separate installs (freebsd 4.8-REL, Xeon 3GHz, 
> >>2G RAM, 2300
> >>hosts, 2500 services and a similar specced freebsd 4.9-REL 
> >>box with 485
> >>hosts, 400 services) both running nagios-1.1 with MySQL support for
> >>everything possible. In general, this setup work fine.
> >>
> >>We use global service and host event handlers to create DB 
> >>event logs to
> >>replicate the nagios.log in the database, but noticed that 
> >>sporadically the
> >>global event handlers just don't fire. There's no obvious 
> >>pattern to it,
> >>there's no attempt to execute the event handlers  according to the
> >>nagios.log, so it's not an actual failure of the event 
> >>handler itself (it's
> >>a very basic command line mysql insert) It doesn't appear to 
> >>be due to the
> >>nagios reload problem (this happens anything from 10 to 30 
> >>minutes into a
> >>clean startup of nagios on both boxes)
> >>
> >>I'm going to upgrade to 1.2 shortly, and run with some 
> >>debugging to see if
> >>we can trace what's going on, failing that we'll have to tail 
> >>the nagios log
> >>itself and create db event entries manually, but that's 
> hardly ideal -
> >>thought I'd check no one here has an answer first?
> > 
> > 
> > Much as I hate reply to my own posts, I've had no respones 
> to this so I can
> > only assume it's not something that affects anyone else, 
> which in turn leads
> > me to think it's not a problem but my understanding that's 
> flawed. I've now
> > upgraded to Nagios 1.2, but with much the same results. 
> I'll include a short
> > random section of the nagios log, if anyone could point out 
> something
> > obvious I'm missing, I'd be very grateful:
> > 
> > * [1080027394] SERVICE ALERT: 
> host-31;GENERIC;CRITICAL;HARD;1;All Down
> > [1080027532] SERVICE ALERT: host-333;GENERIC;WARNING;SOFT;1;One Down
> > [1080027532] GLOBAL SERVICE EVENT HANDLER:
> > host-333;GENERIC;WARNING;SOFT;1;write-db-service-eventlog
> > [1080027642] SERVICE ALERT: host-333;GENERIC;OK;SOFT;2;All Up
> > [1080027642] GLOBAL SERVICE EVENT HANDLER:
> > host-333;GENERIC;OK;SOFT;2;write-db-service-eventlog
> > * [1080028564] SERVICE ALERT: 
> host-96;GENERIC;WARNING;SOFT;1;One Down
> > * [1080028672] SERVICE ALERT: host-96;GENERIC;OK;SOFT;2;All Up
> > [1080028752] SERVICE NOTIFICATION:
> > custserv;host-174;GENERIC;WARNING;notify-by-email;One Down
> > [1080028752] SERVICE NOTIFICATION:
> > corpcustmonitor;host-174;GENERIC;WARNING;notify-by-email;One Down
> > [1080029853] SERVICE ALERT: host-274;SCRIPT;OK;HARD;3;All Up
> > [1080029853] SERVICE NOTIFICATION:
> > custserv;host-274;SCRIPT;OK;notify-by-email;All Up
> > [1080029854] SERVICE NOTIFICATION:
> > corpcustmonitor;host-274;SCRIPT;OK;notify-by-email;All Up
> > [1080029854] GLOBAL SERVICE EVENT HANDLER:
> > host-274;SCRIPT;OK;HARD;3;write-db-service-eventlog
> > [1080030244] Auto-save of retention data completed successfully.
> > 
> > I've marked the 3 entries that I think should have 
> associated global event
> > handlers: host-31 in an initial HARD error, and host-96 
> going into an
> > initial SOFT warning, and recovering a minute or two later. 
> You can clearly
> > see the event handler firing in the other cases. The global 
> event handler is
> > correctly defined and works in all instances in which it 
> actually fires.
> > 
> > grep global /usr/local/etc/nagios/nagios.cfg 
> >  global_host_event_handler=write-db-host-eventlog
> >  global_service_event_handler=write-db-service-eventlog
> > 
> > Anyone have any thoughts on this?
> > 
> > Thanks,
> 
> -- 
> Mvh
> Andreas Ericsson
> OP5 AB
> +46 (0)733 709032
> andreas.ericsson at op5.se
> 
> 
> -------------------------------------------------------
> This SF.Net email is sponsored by: IBM Linux Tutorials
> Free Linux tutorial presented by Daniel Robbins, President and CEO of
> GenToo technologies. Learn everything from fundamentals to system
> administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
> _______________________________________________
> Nagios-users mailing list
> Nagios-users at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/nagios-users
> ::: Please include Nagios version, plugin version (-v) and OS 
> when reporting any issue. 
> ::: Messages without supporting info will risk being sent to /dev/null
> 


-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. 
::: Messages without supporting info will risk being sent to /dev/null





More information about the Users mailing list