Page 1 of 1

Syntax to submit nsclient++ check_drivesize with nrpe

Posted: Thu Aug 15, 2019 2:56 pm
by awilson
Hi. We have been using the check_nt protocol to submit nsclient++ checks. I'm trying to use nrpe instead, but I'm not having success getting nrpe to use the parameters. The check_nrpe command is configured as follows:
$USER1$/check_nrpe -H $HOSTADDRESS$ -t 30 -c $ARG1$ $ARG2$

I tried:

-a '-p ##### check_drivesize "warn=free<20% crit=free<10%" drive=*'

in $ARG1$ leaving $ARG2$ blank and I get:

Incorrect command line arguments supplied

NRPE Plugin for Nagios
Copyright (c) 1999-2008 Ethan Galstad ([email protected])
Version: 2.15

//snip

Is there an obvious error?

Thanks.

Re: Syntax to submit nsclient++ check_drivesize with nrpe

Posted: Thu Aug 15, 2019 3:39 pm
by tgriep
The example command that you have shown is not formatted correctly and that is generating the errors.

What you would need to do is just put in the command in the $ARG1$ field and in the $ARG2$ field, you would put in the arguments required for the command.

For the drive check, you would put this in the $ARG1$ field.

Code: Select all

check_drivesize
And in the $ARG2$ field, you would put in all of the following to test the drive C free space.

Code: Select all

-a drive=C: 'warning=free<20%' 'critical=free<10%' show-all 'perf-config=*(unit:G)' detail-syntax='{${drive_or_name} ${free_pct}% free / ${size} total}' top-syntax='${status}: ${problem_list}'
This will generate an alert on the following.
Warning: 10% Free
Critical: 5% Free
This example came from the following KB article.
https://support.nagios.com/kb/article/d ... s-770.html
Take a look at it for more details.

Re: Syntax to submit nsclient++ check_drivesize with nrpe

Posted: Tue Aug 20, 2019 2:49 pm
by awilson
Thank you so much! That worked. //smile

Re: Syntax to submit nsclient++ check_drivesize with nrpe

Posted: Tue Aug 20, 2019 3:03 pm
by awilson
You can close this.

Re: Syntax to submit nsclient++ check_drivesize with nrpe

Posted: Tue Aug 20, 2019 3:11 pm
by scottwilkerson
awilson wrote:You can close this.
Great!

Locking