Check_disk threshold based on space

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
User avatar
BanditBBS
Posts: 2454
Joined: Tue May 31, 2011 12:57 pm
Location: Scio, OH
Contact:

Check_disk threshold based on space

Post by BanditBBS »

Any chance the check_disk plugin can get the feature added to set different thresholds based on size of partition?

ie. if drive > 500GB use thes thresholds and if <500GB use a different set.

Or am I going to have to write a new one? :)
2 of XI5.6.14 Prod/DR/DEV - Nagios LogServer 2 Nodes
See my projects on the Exchange at BanditBBS - Also check out my Nagios stuff on my personal page at Bandit's Home and at github
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: Check_disk threshold based on space

Post by tmcdonald »

I feel this would need to be set on a service level, not in the plugin code. Granted there's no way to have this logic detect automatically, but I might not understand the requirements. What thresholds specifically would you be looking for given the disk sizes? Could percentages work?
Former Nagios employee
User avatar
BanditBBS
Posts: 2454
Joined: Tue May 31, 2011 12:57 pm
Location: Scio, OH
Contact:

Re: Check_disk threshold based on space

Post by BanditBBS »

Trevor,

Yeah, I'm just think aloud here.....

Like right now I may have a disk check setup like so:

Code: Select all

/usr/local/nagios/libexec/check_disk -w 30% -c 20% -R /ur.*
I'd like to have some sort of commandline option for check_disk that says "check total size of mount and if greater than x use these thresholds instead".

basically, if under 400GB use -w 30% -c 20% but if >=400GB use -w 20% -c 10%
2 of XI5.6.14 Prod/DR/DEV - Nagios LogServer 2 Nodes
See my projects on the Exchange at BanditBBS - Also check out my Nagios stuff on my personal page at Bandit's Home and at github
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: Check_disk threshold based on space

Post by tmcdonald »

It's an open-source project, you're free to make the pull request on Github ;)
Former Nagios employee
Locked