blob: 1b67d14eed142a1ec550e54453801118399a4cbf (
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
27
28
29
|
define site_nagios::add_service (
$hostname, $ip_address, $openvpn_gw = '', $service) {
$ssh = hiera_hash('ssh')
$ssh_port = $ssh['port']
case $service {
'webapp': {
nagios_service {
"${name}_ssh":
use => 'generic-service',
check_command => "check_ssh_port!$ssh_port",
service_description => 'SSH',
host_name => $hostname;
"${name}_cert":
use => 'generic-service',
check_command => 'check_https_cert',
service_description => 'Website Certificate',
host_name => $hostname;
"${name}_website":
use => 'generic-service',
check_command => 'check_https',
service_description => 'Website',
host_name => $hostname
}
}
default: {}
}
}
|