diff options
author | Silvio Rhatto <rhatto@riseup.net> | 2013-06-03 22:25:24 -0300 |
---|---|---|
committer | Silvio Rhatto <rhatto@riseup.net> | 2013-06-03 22:25:24 -0300 |
commit | 6d978291639d6f0537581edef7db27939bd9411f (patch) | |
tree | d7299820e2471acd421f9df1dcdd2f485dcc9286 /manifests | |
parent | 79a8c80c0a85b90cf88d1ea134a5519bd9da788d (diff) | |
download | puppet-nodo-6d978291639d6f0537581edef7db27939bd9411f.tar.gz puppet-nodo-6d978291639d6f0537581edef7db27939bd9411f.tar.bz2 |
Cleaning up nodo::subsystem::monitor
Diffstat (limited to 'manifests')
-rw-r--r-- | manifests/subsystem/monitor.pp | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/manifests/subsystem/monitor.pp b/manifests/subsystem/monitor.pp index b57db9d..f38cffe 100644 --- a/manifests/subsystem/monitor.pp +++ b/manifests/subsystem/monitor.pp @@ -1,6 +1,8 @@ class nodo::subsystem::monitor( $type = 'vserver', $use_nagios = hiera('nodo::subsystem::monitor::use_nagios', True), + $check_ping = hiera('nodo::subsystem::monitor::check_ping', present), + $check_ssh = hiera('nodo::subsystem::monitor::check_ssh', absent), $address = hiera('nodo::subsystem::monitor::address', $::ipaddress), $ping_rate = hiera('nodo::subsystem::monitor::ping_rate', '!100.0,20%!500.0,60%') ) { @@ -9,21 +11,22 @@ class nodo::subsystem::monitor( if $type == 'vserver' { include nagios::target::fqdn - nagios::service::ping { "${::fqdn}": - ping_rate => $ping_rate, - } } if $type == 'host' { class{ 'nagios::target': address => $address, } + } - nagios::service::ping { "$address": - ping_rate => $ping_rate, - } + nagios::service::ping { "${::fqdn}": + ensure => $check_ping, + ping_rate => $ping_rate, } + nagios::service { "check_ssh4": + ensure => $check_ssh, + check_command => "check_ssh_4", + } } - } |