summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorvarac <varacanero@zeromail.org>2013-01-28 22:03:23 +0100
committervarac <varacanero@zeromail.org>2013-01-28 22:03:23 +0100
commit5380b3add3c1cd9c016905d0c339744fc9f2be98 (patch)
treef33174a549af0d4d6f6c9a35158f2e6c97183d9f
parent349c58f668e419595ff3aff902948e7901e88d55 (diff)
re-add nagios service check openvpn
-rw-r--r--puppet/modules/site_nagios/manifests/add_host.pp14
-rw-r--r--puppet/modules/site_nagios/manifests/add_service.pp11
2 files changed, 14 insertions, 11 deletions
diff --git a/puppet/modules/site_nagios/manifests/add_host.pp b/puppet/modules/site_nagios/manifests/add_host.pp
index d5aac67c..498552b5 100644
--- a/puppet/modules/site_nagios/manifests/add_host.pp
+++ b/puppet/modules/site_nagios/manifests/add_host.pp
@@ -1,8 +1,9 @@
define site_nagios::add_host {
- $nagios_host = $name
- $nagios_hostname = $name['domain_full']
- $nagios_ip = $name['ip_address']
- $nagios_services = $name['services']
+ $nagios_host = $name
+ $nagios_hostname = $name['domain_internal']
+ $nagios_ip = $name['ip_address']
+ $nagios_services = $name['services']
+ $nagios_openvpn_gw = $name['openvpn_gateway_address']
# Add Nagios host
nagios_host { $nagios_hostname:
@@ -15,8 +16,9 @@ define site_nagios::add_host {
# First, we need to turn the serice array into hash, using a "hash template"
# see https://github.com/ashak/puppet-resource-looping
$nagios_service_hashpart = {
- 'hostname' => $nagios_hostname,
- 'ip_address' => $nagios_ip,
+ 'hostname' => $nagios_hostname,
+ 'ip_address' => $nagios_ip,
+ 'openvpn_gw' => $nagios_openvpn_gw,
}
$dynamic_parameters = {
'service' => '%s'
diff --git a/puppet/modules/site_nagios/manifests/add_service.pp b/puppet/modules/site_nagios/manifests/add_service.pp
index 25babd18..280cb010 100644
--- a/puppet/modules/site_nagios/manifests/add_service.pp
+++ b/puppet/modules/site_nagios/manifests/add_service.pp
@@ -1,11 +1,12 @@
-define site_nagios::add_service ($hostname, $ip_address, $service) {
+define site_nagios::add_service (
+ $hostname, $ip_address, $openvpn_gw = '', $service) {
case $service {
# don't deploy until we fix 1546
- #'openvpn': {
- # $check_command = "check_openvpn_server_ip_port!$ip_address!1194"
- # $service_description = 'Openvpn'
- #}
+ 'openvpn': {
+ $check_command = "check_openvpn_server_ip_port!$openvpn_gw!1194"
+ $service_description = 'Openvpn'
+ }
'webapp': {
$check_command = 'check_https'
$service_description = 'Website'