blob: a1f99cc9b032ce73a802c9109b765e47b3509af5 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
define site_nagios::add_service ($hostname, $ip_address, $service) {
case $service {
'openvpn': {
$check_command = "check_openvpn_server_ip_port!$ip_address!1194"
$service_description = 'Openvpn'
}
'webapp': {
$check_command = 'check_http'
$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 }
}
}
|