blob: 25babd185cbc6f6fb66a4058d922f49ef999d8ae (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
define site_nagios::add_service ($hostname, $ip_address, $service) {
case $service {
# don't deploy until we fix 1546
#'openvpn': {
# $check_command = "check_openvpn_server_ip_port!$ip_address!1194"
# $service_description = 'Openvpn'
#}
'webapp': {
$check_command = 'check_https'
$service_description = 'Website'
}
default: {
#notice ("No Nagios service check for service \"$service\"")
}
}
if ( $check_command != '' ) {
nagios_service { $name:
use => 'generic-service',
check_command => $check_command,
service_description => $service_description,
host_name => $hostname }
}
}
|