Check_nrpe commands

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
RyanMule
Posts: 57
Joined: Tue Dec 12, 2017 3:14 pm

Check_nrpe commands

Post by RyanMule »

Hello All,

I am in the process of upgrading out nsclient++ in doing so I have to update some checks... Currently I am working with check_nrpe with the check_drivesize command. I got it working however I cannot figure out how to change the crit and warning thresholds.

Below is the exact command I am using

./check_nrpe --host 192.168.240.205 --command check_drivesize
OK All 2 drive(s) are ok|'C:\ used'=21.23616GB;47.72421;53.68974;0;59.65527 'C:\ used %'=36%;80;90;0;100 'D:\ used'=0B;0;0;0;0

I am following this document https://docs.nsclient.org/reference/windows/CheckDisk/

Thank you
Ryan
User avatar
mcapra
Posts: 3739
Joined: Thu May 05, 2016 3:54 pm

Re: Check_nrpe commands

Post by mcapra »

The check library contains oodles of this sort of stuff. Here's one for disk space that has a specific "NSClient++ via check_nrpe" example that includes thresholds and some cool syntax stuff:
https://support.nagios.com/kb/article.php?id=770
Former Nagios employee
https://www.mcapra.com/
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: Check_nrpe commands

Post by tgriep »

Thanks @mcapra for the help.
@RyanMule , if you have any further questions, let us know what you want the threshold level set to and are you checking for used space or free space.
Be sure to check out our Knowledgebase for helpful articles and solutions!
RyanMule
Posts: 57
Joined: Tue Dec 12, 2017 3:14 pm

Re: Check_nrpe commands

Post by RyanMule »

mcapra wrote:The check library contains oodles of this sort of stuff. Here's one for disk space that has a specific "NSClient++ via check_nrpe" example that includes thresholds and some cool syntax stuff:
https://support.nagios.com/kb/article.php?id=770
Thank you for this information! Testing these commands out now!
RyanMule
Posts: 57
Joined: Tue Dec 12, 2017 3:14 pm

Re: Check_nrpe commands

Post by RyanMule »

tgriep wrote:Thanks @mcapra for the help.
@RyanMule , if you have any further questions, let us know what you want the threshold level set to and are you checking for used space or free space.
Thank you for your reply! I am still having trouble... I am looking for used space. Below is the command I am using. I am looking to change the default thresholds to Warn=92% Crit=95%

This is the command and output I am getting
./check_nrpe -H 192.168.240.205 -c check_drivesize -a drive=C: 'warning=used>92%' 'critical=used>95%' show-all 'perf-config=*(unit:G)' detail-syntax='{${drive_or_name} ${used_pct}% used / ${size} total}' top-syntax='${status}: ${problem_list}'
Exception processing request: Request contained arguments (not currently allowed, check the allow arguments option).
[root@nagios02 libexec]#

I greatly appreciate your help!

Thank you
Ryan
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: Check_nrpe commands

Post by tgriep »

What needs to be done is to enable arguments in the NSClient++ ini file.
If you are using 4.x.x or the 5.x.x version of the NSClient++ you will have to edit the C:\Program Files\NSClient++\nsclient.ini file and under this section

Code: Select all

[/settings/NRPE/server]
Add this option to enable the ability for the agent to receive arguments and to process special characters.

Code: Select all

allow arguments = true
allow nasty characters = true
Save the file and restart the NSClient++ service and it should be enabled to receive the arguments defined in the check_nrpe command.
Be sure to check out our Knowledgebase for helpful articles and solutions!
RyanMule
Posts: 57
Joined: Tue Dec 12, 2017 3:14 pm

Re: Check_nrpe commands

Post by RyanMule »

This did the trick! thank you tgriep!!!
tgriep wrote:What needs to be done is to enable arguments in the NSClient++ ini file.
If you are using 4.x.x or the 5.x.x version of the NSClient++ you will have to edit the C:\Program Files\NSClient++\nsclient.ini file and under this section

Code: Select all

[/settings/NRPE/server]
Add this option to enable the ability for the agent to receive arguments and to process special characters.

Code: Select all

allow arguments = true
allow nasty characters = true
Save the file and restart the NSClient++ service and it should be enabled to receive the arguments defined in the check_nrpe command.
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Check_nrpe commands

Post by scottwilkerson »

RyanMule wrote:This did the trick! thank you tgriep!!!
tgriep wrote:What needs to be done is to enable arguments in the NSClient++ ini file.
If you are using 4.x.x or the 5.x.x version of the NSClient++ you will have to edit the C:\Program Files\NSClient++\nsclient.ini file and under this section

Code: Select all

[/settings/NRPE/server]
Add this option to enable the ability for the agent to receive arguments and to process special characters.

Code: Select all

allow arguments = true
allow nasty characters = true
Save the file and restart the NSClient++ service and it should be enabled to receive the arguments defined in the check_nrpe command.
Glad it's working

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