Created
June 15, 2015 22:31
-
-
Save VerosK/1caaaaf19e7899730a8a to your computer and use it in GitHub Desktop.
Check Windows Disks with NRPE over SOCKS
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
object CheckCommand "check_windows_disk_nrpe" { | |
import "plugin-check-command" | |
command = [ Socksify, "/usr/lib/nagios/plugins/check_nrpe" ] | |
arguments = { | |
"-H" = "$host.address$" | |
"-c" = "CheckDriveSize" | |
"-a" = { | |
value = "$nrpe_args$" | |
repeat_key = false | |
order = 1 | |
} | |
} | |
vars.nrpe_args = [ "Drive=$disk_name$:", "perf-unit=B", "MinWarn=$min_warn$", "MinCrit=$min_crit$", "ShowAll" ] | |
vars.min_warn="15%" | |
vars.min_crit="10%" | |
} | |
apply Service for ( disk_name => config in host.vars.drives ) { | |
import "3rd-class" | |
name = "disk_"+disk_name | |
display_name = disk_name + ":" | |
check_command = "check_windows_disk_nrpe" | |
vars += config | |
vars.disk_name = disk_name | |
assign where (host.vars.has_nrpe) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment