nagios: Disable swap monitoring if host has no swap.

This commit is contained in:
Timo Makinen 2015-05-07 22:31:44 +03:00
parent c7272c4a3e
commit edba34ca1f

View file

@ -491,6 +491,7 @@ class nagios::target::nrpe inherits nagios::target {
default => "nagios-plugins-load",
}
}
if regsubst($::swapsize, '^([0-9]+)\..*', '\1') != 0 {
nagios::target::nrpe::service { "check_swap -w 75% -c 50%":
description => "Swap",
package => $::operatingsystem ? {
@ -500,6 +501,7 @@ class nagios::target::nrpe inherits nagios::target {
default => "nagios-plugins-swap",
}
}
}
if $::raid and "linux-md" in split($::raid, ',') {
nagios::target::nrpe::service { "check_linux_raid":