Event Handler Arguments

Bernd.Stroessenreuther at spb.de Bernd.Stroessenreuther at spb.de
Thu Jun 12 15:47:53 CEST 2003


Hi everybody,

for defining event handlers the documentation tells me to do it as follows:

define service{
     host_name                somehost
     service_description      HTTP
     max_check_attempts       4
     event_handler            restart-httpd
     ...other service variables...
     }

define command{
     command_name   restart-httpd
     command_line   /usr/local/nagios/libexec/eventhandlers/restart-httpd
$SERVICESTATE$ $STATETYPE$ $SERVICEATTEMPT$
     }

This way it works fine. But I would like to give over some arguments to the
command.

define service{
     host_name                somehost
     service_description      HTTP
     max_check_attempts       4
     event_handler            multi-purpose-handler!http
     ...other service variables...
     }

define command{
     command_name   multi-purpose-handler
     command_line   /usr/local/nagios/libexec/eventhandlers/
multi-purpose-handler $ARG1$ $SERVICESTATE$ $STATETYPE$ $SERVICEATTEMPT$
     }

But the macro definition tells me, that this is not possible. In fact this
doesn't work.
Is there a special technical reason, why it is not possible to give
argumets to event handlers?

Freundliche Grüße
i. A. Bernd Strößenreuther

-------------------------------------------------------------
Sparda-Datenverarbeitung eG
Server-Prozessmanagement / eBIS
Freiligrathstraße 32, 90482 Nürnberg
Tel: 0911 / 54 86-802
Fax: 0911 / 54 86-177
mailto:bernd.stroessenreuther at spb.de




-------------------------------------------------------
This SF.NET email is sponsored by: eBay
Great deals on office technology -- on eBay now! Click here:
http://adfarm.mediaplex.com/ad/ck/711-11697-6916-5




More information about the Developers mailing list