aboutsummaryrefslogtreecommitdiff
path: root/manifests
diff options
context:
space:
mode:
Diffstat (limited to 'manifests')
-rw-r--r--manifests/subsystem/monitor.pp17
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",
+ }
}
-
}