Page 1 of 1

Event handler Arguments

Posted: Thu Mar 10, 2011 12:36 pm
by wllewis
In my nagios core configuration, I was able to create an event handler that passed an argument (application script) to the nrpe daemon on the client. This way I was able to write a single event_handler called 'restart_process' that could restart any processes instead of having individual ones for each process on the client and needing to create all the commands on the server side.

It appears I can't pass extra arguments when setting up the commands and selecting the event_handler via the XI interface. Nor did these import when I tried.

I was just wondering if this is possible?

thanks,
bill

My original nagios definition was something like this:
event_handler restart_process!$SERVICESTATE$ $SERVICESTATETYPE$ $SERVICEATTEMPT$ postfix

On the client the restart_process is defined with ARG1-3 and ARG7 and will restart the postfix process in this instance.

Re: Event handler Arguments

Posted: Fri Mar 11, 2011 7:54 pm
by admin
It looks like NagiosQL doesn't support command parameters being passed to host and service event handlers. We've started rewriting the Core Config Manager and I will add this as a feature request for implementation. I just opened a tracker request for it:

http://tracker.nagios.com/view.php?id=131