Page 1 of 1

Check_disk threshold based on space

Posted: Fri Jan 22, 2016 4:56 pm
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? :)

Re: Check_disk threshold based on space

Posted: Mon Jan 25, 2016 1:01 pm
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?

Re: Check_disk threshold based on space

Posted: Mon Jan 25, 2016 2:53 pm
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%

Re: Check_disk threshold based on space

Posted: Tue Jan 26, 2016 12:32 pm
by tmcdonald
It's an open-source project, you're free to make the pull request on Github ;)