Page 1 of 1

[Nagios-devel] Event Handler Arguments

Posted: Thu Jun 12, 2003 5:49 am
by Guest
Hi everybody,

for defining event handlers the documentation tells me to do it as foll=
ows:

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-htt=
pd
$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 t=
his
doesn't work.
Is there a special technical reason, why it is not possible to give
argumets to event handlers?

Freundliche Gr=FC=DFe
i. A. Bernd Str=F6=DFenreuther

-------------------------------------------------------------
Sparda-Datenverarbeitung eG
Server-Prozessmanagement / eBIS
Freiligrathstra=DFe 32, 90482 N=FCrnberg
Tel: 0911 / 54 86-802
Fax: 0911 / 54 86-177
mailto:[email protected]
=







This post was automatically imported from historical nagios-devel mailing list archives
Original poster: [email protected]