blob: 280cb0107b2d6034a0bd1401178b5885ded50505 (
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
26
|
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!$openvpn_gw!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 }
}
}
|