I am using check_nrpe to call check_disk on a remote machine. The remote partition should display a warning message but is not doing so. Iam able to recreate the problem via the command line. Here is what I am talking about:
[nagios@dtjhayden ~]$ /usr/local/nagios/libexec/check_nrpe -H diskserver -c check_disk -a "20 10 /mnt/big"
DISK WARNING - free space: /mnt/big 641201 MB (13% inode=99%);| /mnt/big=3981604MB;4693427;;0;4693447
This what I would expect to see but when I do this
[nagios@dtjhayden ~]$ /usr/local/nagios/libexec/check_nrpe -H diskserver -c check_disk -a 20 10 /mnt/big
DISK OK - free space: /mnt/big 641201 MB (13% inode=99%);| /mnt/big=3981604MB;4693427;4693437;0;4693447
This is what I see (and is also what is showing up in my logs). I am guessing that nagios is doing the latter and not the former (ie. not quoting the argument list).
Is there any way for me to fix this via configuration files etc?
A bit more info about this issue. It is only happening with my linux boxes. My windows server return the correct warnings but the linux machines are problematic. Could it be that I have compiled the plugins (check_disk or check_nrpe) incorrectly on the linux machines? Any clues would be appreciated.
just a quick question: when you run “check_disk” as a user logged on “diskserver”, with the right arguments (like “./check_disk 20 10 /mnt/big”, what is the output ?
My bad! I just looked in the source code for check_disk and the two command forms are NOT equivalent! One is for percents (obviously) and the other is for units. Just not sure why my initial command line test with and without quotes worked the way it does.
Oh well, a project for another day in ALL my spare time. Hah!