diff options
Diffstat (limited to 'puppet/modules')
-rw-r--r-- | puppet/modules/site_nagios/manifests/add_host.pp | 14 | ||||
-rw-r--r-- | puppet/modules/site_nagios/manifests/add_service.pp | 11 |
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' |