Syntax to submit nsclient++ check_drivesize with nrpe

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
awilson
Posts: 224
Joined: Mon Mar 21, 2016 1:20 pm

Syntax to submit nsclient++ check_drivesize with nrpe

Post 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.
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: Syntax to submit nsclient++ check_drivesize with nrpe

Post 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.
Be sure to check out our Knowledgebase for helpful articles and solutions!
awilson
Posts: 224
Joined: Mon Mar 21, 2016 1:20 pm

Re: Syntax to submit nsclient++ check_drivesize with nrpe

Post by awilson »

Thank you so much! That worked. //smile
awilson
Posts: 224
Joined: Mon Mar 21, 2016 1:20 pm

Re: Syntax to submit nsclient++ check_drivesize with nrpe

Post by awilson »

You can close this.
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Syntax to submit nsclient++ check_drivesize with nrpe

Post by scottwilkerson »

awilson wrote:You can close this.
Great!

Locking
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
Locked