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
Check_nrpe commands
Re: Check_nrpe commands
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
https://support.nagios.com/kb/article.php?id=770
Former Nagios employee
https://www.mcapra.com/
https://www.mcapra.com/
Re: Check_nrpe commands
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.
@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!
Re: Check_nrpe commands
Thank you for this information! Testing these commands out now!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
Re: Check_nrpe commands
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
Re: Check_nrpe commands
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
Add this option to enable the ability for the agent to receive arguments and to process special characters.
Save the file and restart the NSClient++ service and it should be enabled to receive the arguments defined in the check_nrpe command.
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]Code: Select all
allow arguments = true
allow nasty characters = trueBe sure to check out our Knowledgebase for helpful articles and solutions!
Re: Check_nrpe commands
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 sectionAdd this option to enable the ability for the agent to receive arguments and to process special characters.Code: Select all
[/settings/NRPE/server]Save the file and restart the NSClient++ service and it should be enabled to receive the arguments defined in the check_nrpe command.Code: Select all
allow arguments = true allow nasty characters = true
-
scottwilkerson
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: Check_nrpe commands
Glad it's workingRyanMule 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 sectionAdd this option to enable the ability for the agent to receive arguments and to process special characters.Code: Select all
[/settings/NRPE/server]Save the file and restart the NSClient++ service and it should be enabled to receive the arguments defined in the check_nrpe command.Code: Select all
allow arguments = true allow nasty characters = true
Locking