diff --git a/nagios/manifests/target.pp b/nagios/manifests/target.pp index 0b44cbd..a824dd6 100644 --- a/nagios/manifests/target.pp +++ b/nagios/manifests/target.pp @@ -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", + } } }