nagios: Disable swap monitoring if host has no swap.
This commit is contained in:
parent
c7272c4a3e
commit
edba34ca1f
1 changed files with 9 additions and 7 deletions
|
@ -491,13 +491,15 @@ class nagios::target::nrpe inherits nagios::target {
|
||||||
default => "nagios-plugins-load",
|
default => "nagios-plugins-load",
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
nagios::target::nrpe::service { "check_swap -w 75% -c 50%":
|
if regsubst($::swapsize, '^([0-9]+)\..*', '\1') != 0 {
|
||||||
description => "Swap",
|
nagios::target::nrpe::service { "check_swap -w 75% -c 50%":
|
||||||
package => $::operatingsystem ? {
|
description => "Swap",
|
||||||
"openbsd" => undef,
|
package => $::operatingsystem ? {
|
||||||
"debian" => "nagios-plugins-basic",
|
"openbsd" => undef,
|
||||||
"ubuntu" => "nagios-plugins-basic",
|
"debian" => "nagios-plugins-basic",
|
||||||
default => "nagios-plugins-swap",
|
"ubuntu" => "nagios-plugins-basic",
|
||||||
|
default => "nagios-plugins-swap",
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue