Page 1 of 1

Disable EH on NAGIOS

Posted: Thu May 17, 2018 9:31 am
by Nabi
Hello,

We have to disable EH on NAGIOS server when NAGIOS got crashed so we can decrease the load on the server.

However, when we do that from the GUI, then after some time it gets enabled on its own. Any idea please what is the reason?

We tried even via the CMD to modify some parameters like:

egrep -i "accept_passive_service_checks|retain_state_information" /usr/local/nagios/etc/nagios.cfg
accept_passive_service_checks=0
retain_state_information=0


Also we were not sure if this really can disable the EH or not as the GUI does not give correct information.

Any help please?

Thanks,

Nabi

Re: Disable EH on NAGIOS

Posted: Thu May 17, 2018 3:39 pm
by cdienger
https://assets.nagios.com/downloads/nag ... t_handlers has information on disabling event handlers. Note that you may need to also disable state retention if it is enabled.

Re: Disable EH on NAGIOS

Posted: Fri May 18, 2018 3:45 am
by Nabi
Thanks, yeah we were trying with these options, but it seems on the GUI for some reason it gets enabled on its own after some time.
So i am not sure if we still miss some option or we have some other issue..

Thanks,

Nabi

Re: Disable EH on NAGIOS

Posted: Fri May 18, 2018 1:00 pm
by cdienger
Can you provide a copy of your nagios.cfg after you've edited it to disable event handlers?

Re: Disable EH on NAGIOS

Posted: Fri May 25, 2018 3:59 am
by Nabi
Ok, if i could ask the question differently for now.

If we disable the EH via external command like this:

=================
now=`date +%s`
commandfile='/usr/local/nagios/var/rw/nagios.cmd'
 
/usr/bin/printf "[%lu] DISABLE_EVENT_HANDLERS\n" $now > $commandfile

=================

Is there any way please to show that EH is really disabled?


Thanks,

Nabi

Re: Disable EH on NAGIOS

Posted: Fri May 25, 2018 3:10 pm
by lmiltchev
You can just run:

Code: Select all

grep enable_event_handlers /usr/local/nagios/var/status.dat
or

Code: Select all

grep enable_event_handlers /var/nagiosramdisk/status.dat
if you are using ramdisk
or

Code: Select all

grep enable_event_handlers /custom/path/to/the/status.dat
You should see:

Code: Select all

enable_event_handlers=0