Unknown argument error with check_disk
Posted: Wed Mar 06, 2019 8:31 am
I've got this odd issue on my hand regarding the use of check_disk with nagios.
If i manually do (where [hostname is the actual IP of the host) it works fine and returns which is the expected result.
However, moving that into Nagios itself results in it throwing out "unknown argument"
My nrpe.cfg has check_disk defined as
And in nagios I have check_disk_lin defined as
And then the host itself has the service defined as
I've been bashing my head in with this issue for a few hours now and I have no idea what the problem might be.
If i manually do
Code: Select all
./check_nrpe -H [host] -c check_disk -a 25 50 /mnt/nfs
Code: Select all
DISK OK - free space: /mnt/nfs 470888 MB (31.72% inode=100%);| /mnt/nfs=1013186MB;1484050;1484025;0;1484075
However, moving that into Nagios itself results in it throwing out "unknown argument"
Code: Select all
Status Information: Unknown argument
Usage:
check_disk -w limit -c limit [-W limit] [-K limit] {-p path
Performance Data: -x device} [-C] [-E] [-e] [-f] [-g group ] [-k] [-l] [-M] [-m] {-A | [-R path] [-r path]} [-s] [-t timeout] [-u unit] [-v] [-X type] [-N type] [-n]
Code: Select all
command[check_disk]=/usr/local/nagios/libexec/check_disk -w $ARG1$ -c $ARG2$ -p $ARG3$
Code: Select all
define command {
command_name check_disk_lin
command_line $USER1$/check_nrpe -H $HOSTADDRESS$ -c check_disk -a '$ARG1$ $ARG2$ $ARG3$'
}
Code: Select all
define service{
use local-service
host_name apphost2
service_description Disk Utilitation - Backup
check_command check_disk_lin!25!10!/mnt/nfs
}