eventhandler halts Nagios
Posted: Mon Dec 10, 2012 11:54 am
In my central Nagios installation, I make use of ConSol*'s check_logfiles script. In some situations, I need to pause regular checking, manually run some cruncher on a remote machine, then restart checking that service.
This is done as event handler, which works well.
However it seems the whole of Nagios (checks, updates to nagios.log, everything) pauses, every time said eventhandler script is run.
I care, because this processing done in an eventhandler can take tens of minutes, during which nothing else happens at the central Nagios site, as well as a check for Nagios' wellbeing triggers, as nagios.log is not updated.
Before I dig deeper .. is this by design?
Am I calling my script wrong?
Should I take care of going into the background myself?
Any help is greatly appreciated!
Rupert
This is done as event handler, which works well.
However it seems the whole of Nagios (checks, updates to nagios.log, everything) pauses, every time said eventhandler script is run.
I care, because this processing done in an eventhandler can take tens of minutes, during which nothing else happens at the central Nagios site, as well as a check for Nagios' wellbeing triggers, as nagios.log is not updated.
Before I dig deeper .. is this by design?
Am I calling my script wrong?
Should I take care of going into the background myself?
Code: Select all
define command {
command_name untangle-check_logfiles-over-ssh
command_line $USER2$/untangle-check_logfiles-over-ssh $SERVICESTATE$ $SERVICESTATETYPE$ $SERVICEATTEMPT$ $HOSTADDRESS$ $ARG1$ '$ARG2$'
}
define service {
...
eventhandler untangle-check_logfiles-over-ssh!username!'check_logfiles -f check_logfiles.conf --searches=Service.Log'
}
Rupert