eventhandler arguments?
Thomas.Zimmer at oppenheim.de
Thomas.Zimmer at oppenheim.de
Thu Oct 21 15:40:30 CEST 2004
hi all!
did anyone ever try to execute eventhandlers with arguments? the
verification of the config-files fails if the eventhandler has parameter.
below you can see my configuration of a nrpe-restart-eventhandler, i´d like
to pass the hostname (that functions) and a free-defined name of the
nrpe-configuration file (per host)
i configured the service via nawui, so think it should be correct
define service {
host_name machine
service_description NRPE_CLIENT
check_command
check_nrpe_cvs!check_procs!-w 0:1024 -c 0:1024 -C sched
register 1
use generic-service ; The
\\\'name\\\ <\\\'name\\\> ' of this service template
max_check_attempts 1
normal_check_interval 1
retry_check_interval 1
active_checks_enabled 1
check_period 24x7
passive_checks_enabled 1
parallelize_check 1
event_handler restart_nrpe!nrpe.cfg
event_handler_enabled 1
flap_detection_enabled 1
process_perf_data 0
notification_interval 0
notification_period 24x7
notification_options c
notifications_enabled 1
contact_groups nagios
}
define command {
command_name restart_nrpe
command_line
/opt/prod/nagios/nagios_test/eventhandler/start_nrpe $HOSTNAME$ $ARG1$
}
verification-output is:
...
Error: Event handler command 'restart_nrpe!nrpe.cfg' specified in service
'NRPE_CLIENT' for host 'oftvwd03' not defined anywhere
...
it works without the argument "nrpe.cfg".
greetz, thomas.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.monitoring-lists.org/archive/users/attachments/20041021/a4b7b3ff/attachment.html>
More information about the Users
mailing list