[Nagiosplug-help] Re: syntax question check_nrpe & check_disk
Ian Masters
ian at acces.co.jp
Tue Sep 7 01:47:01 CEST 2004
Try this:
# Service definition
define service{
use generic-service ; Name of
service template to use
host_name tom
service_description Disk usage 1 via NRPE
...
check_command check_nrpe!check_disk
}
You're then telling the remote machine to run the check that command with
the parameters defined on the remote machine.
Hope this helps.
Ian Masters
> I've been configuring nagios for a while and now I want to do some checks,
> using NRPE.
> I want to monitor the disk space of machineA from the monitoring nagios
> machineB
>
> machine A, nrpe.cfg :
> command[check_disk]=/opt/nrpe/check_disk -w $ARG1$ -c $ARG2$
>
> machine B (nagios server), from the command line:
> check_nrpe -H machineA -p 5666 -t 60 -n -c 'check_disk!20%!10%'
>
> this works, because I put quotes around the check_disk command
> But now, I want it to work in Nagios, so I configure the check_commands.cfg
> and the services.cfg file
>
> check_commands.cfg
> # 'check_nrpe' command definition
> define command{
> command_name check_nrpe
> command_line /opt/nagios/libexec/check_nrpe -H machineA -p 5666 -t 60 -n -c
> $ARG1$
> }
>
> services.cfg
>
> # Service definition
> define service{
> ...
> check_command check_nrpe!'check_disk!20%!10%'
> }
>
> But this doesn't work, I get 'no output' in Nagios. Can somebody tell me how
> to write the command in services.cfg to obtain a good result. In other words
> : how can I pass 'check_disk!20%!10%' to $ARG1$
More information about the Help
mailing list