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,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":
|
||||
|
|
Loading…
Add table
Reference in a new issue