From 724bc04aa9ece40fe2c54979afffdf53c5564758 Mon Sep 17 00:00:00 2001 From: Micah Anderson Date: Wed, 3 Apr 2013 13:19:05 -0400 Subject: move the $use_nagios check into the stunnel::service define, where it is more useful for creating accurate nagios-statd-proc checks for the correct stunnel names --- manifests/init.pp | 11 ----------- manifests/service.pp | 7 +++++++ 2 files changed, 7 insertions(+), 11 deletions(-) diff --git a/manifests/init.pp b/manifests/init.pp index 270540d..1204909 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -24,15 +24,4 @@ class stunnel ( $ensure_version = 'present', $startboot = '1', $default_extra ) centos: { class { 'stunnel::centos': } } default: { class { 'stunnel::default': } } } - - if $use_nagios { - case $nagios_stunnel_procs { - false: { info("We aren't doing nagios checks for stunnel on ${::fqdn}" ) } - default: { nagios::service - { 'stunnel': - check_command => 'nagios-stat-proc!/usr/bin/stunnel4!6!5!proc'; - } - } - } - } } diff --git a/manifests/service.pp b/manifests/service.pp index b925d00..fd64f9b 100644 --- a/manifests/service.pp +++ b/manifests/service.pp @@ -51,6 +51,7 @@ define stunnel::service ( $timeoutconnect = false, $timeoutidle = false, $transparent = false, + $use_nagios = false, $verify = false ) { @@ -66,4 +67,10 @@ define stunnel::service ( group => 0, mode => '0600'; } + + if $use_nagios { + nagios::service { "stunnel_${name}": + check_command => "nagios-stat-proc!/usr/bin/stunnel4 /etc/stunnel/${name}.conf!6!5!proc"; + } + } } -- cgit v1.2.3