[Nagiosplug-help] Help with check_nrpe again

Ian Davidson idavidso at juniper.net
Mon May 12 10:06:08 CEST 2003


On my monitoring station I have setup a service, as:

# TEST-DISK-SPACE-ON-LINUX-HOSTS
define service {
service_description disk-check
use generic-service
check_command   check_nrpe!check_disk
contact_groups  linux-admins
host_name       dc
}

The check-command is
# 'check_nrpe' command definition
define command{
command_name    check_nrpe
command_line    /usr/local/nagios/libexec/check_nrpe -H $HOSTADDRESS -c
$ARG1$
}

On my remote-host  nrpe.cfg file I have:
command[check_disk]=/usr/local/nagios/libexec/check_disk -w 20% -c 10%
-p /dev/hda1

If I run this command on the remote-host I get a good result.
[dc nagios]# /usr/local/nagios/libexec/check_disk -w 20% -c 10% -p
/dev/hda1
DISK OK [35179 kB (79%) free on /dev/hda1]

Also, if I run the check_nrpe command from the monitoring station I get:

[libexec]# ./check_nrpe -H dc -c check_disk
DISK OK [35179 kB (79%) free on /dev/hda1]


However when nagios runs, the status in the service window for the host
'dc' is "Invalid host name '-c'"

I cannot see where this is failing. Maybe looking at the same problem
for hours doesn't help! Can someone point out where I've gone wrong.

Cheers,

Ian




More information about the Help mailing list