Remote disk check not working

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: Remote disk check not working

Post by ssax »

Me personally, I would define it like this:

Code: Select all

define command {
       command_name                             check_nrpe
       command_line                             $USER1$/check_nrpe -H $HOSTADDRESS$ -t 30 -c $ARG1$ $ARG2$
}
Then each service would be defined like this:

Code: Select all

check_command                   check_nrpe!check_disk!-a '-w 20% -c 10% -p /'

check_command                   check_nrpe!check_cpu_stats!-a '-w 85 -c 95'

check_command                   check_nrpe!check_load!-a '-w 15,10,5 -c 30,20,10'
And just define the nrpe.cfg commands like so:

Code: Select all

command[check_disk]=/usr/local/nagios/libexec/check_disk $ARG1$

command[check_cpu_stats]=/usr/local/nagios/libexec/check_cpu_stats.sh $ARG1$

command[check_load]=/usr/local/nagios/libexec/check_load $ARG1$

Which you may already have defined in /usr/local/nagios/etc/nrpe/common.cfg on your remote machine.
jnojr
Posts: 13
Joined: Wed Apr 27, 2016 3:15 pm

Re: Remote disk check not working

Post by jnojr »

rkennedy wrote:Nice! Did that get it working for you on your system? Just trying to figure out if we can mark this as resolved.
On one system. On another, with the same service definition, I get:

DISK CRITICAL - 20% is not accessible: No such file or directory

check_nrpe via the command line both on server and client work. Both systems use the same check_nrpe_disk command, and both have the same check_command, so I'm really scratching my head here. I have to assume I changed something while stumbling around with the first host and forgot it :-/
User avatar
Box293
Too Basu
Posts: 5126
Joined: Sun Feb 07, 2010 10:55 pm
Location: Deniliquin, Australia
Contact:

Re: Remote disk check not working

Post by Box293 »

Please post your nrpe config from the machine that is not working.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
jnojr
Posts: 13
Joined: Wed Apr 27, 2016 3:15 pm

Re: Remote disk check not working

Post by jnojr »

Box293 wrote:Please post your nrpe config from the machine that is not working.
GAH I was using the default line for check_disk...

Got it now!
User avatar
Box293
Too Basu
Posts: 5126
Joined: Sun Feb 07, 2010 10:55 pm
Location: Deniliquin, Australia
Contact:

Re: Remote disk check not working

Post by Box293 »

Too easy. Let us know if there is anything else we can help with in relation to this issue.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Locked