diff options
author | Jerome Charaoui <jcharaoui@cmaisonneuve.qc.ca> | 2015-03-02 15:36:32 +0000 |
---|---|---|
committer | Jerome Charaoui <jcharaoui@cmaisonneuve.qc.ca> | 2015-03-02 15:36:32 +0000 |
commit | 386aa6df458b228ddd0ded529054fe65e92f03a2 (patch) | |
tree | 0a5805d92561d31a5714b4b52b3f70fba0fa9797 /manifests | |
parent | a4b8195e7a5d444448b3750d66ec725d6f7c67ab (diff) | |
parent | 9ee857f480c0f18596cc55a6885d6253e9d4d124 (diff) |
Merge branch 'document_nagios_custom_logic' into 'master'
Document nagios custom logic
Add some note for ppl who need to inject their own logic before creating nagios-related checks.
See merge request !1
Diffstat (limited to 'manifests')
-rw-r--r-- | manifests/service.pp | 8 | ||||
-rw-r--r-- | manifests/service/nagios.pp | 12 |
2 files changed, 15 insertions, 5 deletions
diff --git a/manifests/service.pp b/manifests/service.pp index 666826d..fe36c2f 100644 --- a/manifests/service.pp +++ b/manifests/service.pp @@ -51,7 +51,7 @@ define stunnel::service ( $timeoutconnect = false, $timeoutidle = false, $transparent = false, - $use_nagios = false, + $manage_nagios = false, $verify = false ) { @@ -71,9 +71,7 @@ define stunnel::service ( mode => '0600'; } - if $use_nagios { - nagios::service { "stunnel_${name}": - check_command => "nagios-stat-proc!/usr/bin/stunnel4 /etc/stunnel/${name}.conf!6!5!proc"; - } + if $manage_nagios { + stunnel::service::nagios { $name: } } } diff --git a/manifests/service/nagios.pp b/manifests/service/nagios.pp new file mode 100644 index 0000000..578b417 --- /dev/null +++ b/manifests/service/nagios.pp @@ -0,0 +1,12 @@ +# Put a Nagios service check in place for a specific tunnel. +# +# The resource name will be used to point to the corresponding stunnel +# configuration file. +# +define stunnel::service::nagios () { + + nagios::service { "stunnel_${name}": + check_command => "nagios-stat-proc!/usr/bin/stunnel4 /etc/stunnel/${name}.conf!6!5!proc"; + } + +} |