Hi There,
I am using USEDDISKSPACE argument on check command Check_xi_service_nsclient to check the drive space. Right now I am monitoring drive space using % like this -l C -w 85 -c 95 but, I wanted to use the condition like below,
1. Warning - Generate a warning alert when the drive space goes below 85% and the available space is less than 5 GB.
2. Critical - Generate a critical alert when the drive space goes below 95% and the available space is less than 2 GB.
Thank you in advance!
Check_xi_service_nsclient (USEDDISKSPACE)
Re: Check_xi_service_nsclient (USEDDISKSPACE)
This documentation may be helpful:
https://docs.nsclient.org/0.5.0/samples/index.html
Specifically, if you wanted to designate multiple criteria for drive space checks, you might give this a shot:
Though I haven't tested that, the syntax works for filters. Unsure if it works for thresholds.
https://docs.nsclient.org/0.5.0/samples/index.html
Specifically, if you wanted to designate multiple criteria for drive space checks, you might give this a shot:
Code: Select all
check_drivesize "crit=free<95% or free<2G" "warn=free<85% or free<5G"
Former Nagios employee
https://www.mcapra.com/
https://www.mcapra.com/
- Box293
- Too Basu
- Posts: 5126
- Joined: Sun Feb 07, 2010 10:55 pm
- Location: Deniliquin, Australia
- Contact:
Re: Check_xi_service_nsclient (USEDDISKSPACE)
USEDDISKSPACE is checked via check_nt and it does not have those advanced features.
You would need to look at creating a check_nrpe check that allows for more complex options.
First you need to enable NRPE in NSClient++:
https://assets.nagios.com/downloads/nag ... ios-XI.pdf
This KB article gives an example of an NRPE service:
https://support.nagios.com/kb/article.p ... tegory=102
This page has a list of different disk check commands:
http://sites.box293.com/nagios/guides/c ... disk-usage
I've not done it myself but I think you can have multiple warning= and critical= arguments, you'll have to test and let us know.
You would need to look at creating a check_nrpe check that allows for more complex options.
First you need to enable NRPE in NSClient++:
https://assets.nagios.com/downloads/nag ... ios-XI.pdf
This KB article gives an example of an NRPE service:
https://support.nagios.com/kb/article.p ... tegory=102
This page has a list of different disk check commands:
http://sites.box293.com/nagios/guides/c ... disk-usage
I've not done it myself but I think you can have multiple warning= and critical= arguments, you'll have to test and let us know.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Re: Check_xi_service_nsclient (USEDDISKSPACE)
Thank you for your response.
I installed NRPE on the server and it works fine. Please guide me on how to match both condition? I tried all the below but, only one condition works like 10% or the integer value 10gb. Please advise on the parameter to match both conditions
CHECK_NRPE
check_drivesize "crit=free<10%" "crit=free<2G" drive=*:
Do I need to use filter type? if yes, can you guide me on the syntax and how to use in above command
I installed NRPE on the server and it works fine. Please guide me on how to match both condition? I tried all the below but, only one condition works like 10% or the integer value 10gb. Please advise on the parameter to match both conditions
CHECK_NRPE
check_drivesize "crit=free<10%" "crit=free<2G" drive=*:
Do I need to use filter type? if yes, can you guide me on the syntax and how to use in above command
Re: Check_xi_service_nsclient (USEDDISKSPACE)
Your command should look like this to get the criteria you are looking for.
Code: Select all
check_drivesize -a drive=C: 'warning=free<5G or free<15%' 'critical=free<2G or free<5%' show-all
Be sure to check out our Knowledgebase for helpful articles and solutions!
Re: Check_xi_service_nsclient (USEDDISKSPACE)
Thanks guys for your help! This worked for me! Please feel free to close this thread.
I appreciate your help!
I appreciate your help!