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,13 +491,15 @@ class nagios::target::nrpe inherits nagios::target {
default => "nagios-plugins-load",
}
}
nagios::target::nrpe::service { "check_swap -w 75% -c 50%":
description => "Swap",
package => $::operatingsystem ? {
"openbsd" => undef,
"debian" => "nagios-plugins-basic",
"ubuntu" => "nagios-plugins-basic",
default => "nagios-plugins-swap",
if regsubst($::swapsize, '^([0-9]+)\..*', '\1') != 0 {
nagios::target::nrpe::service { "check_swap -w 75% -c 50%":
description => "Swap",
package => $::operatingsystem ? {
"openbsd" => undef,
"debian" => "nagios-plugins-basic",
"ubuntu" => "nagios-plugins-basic",
default => "nagios-plugins-swap",
}
}
}