-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathicinga2example.conf
More file actions
85 lines (66 loc) · 1.71 KB
/
icinga2example.conf
File metadata and controls
85 lines (66 loc) · 1.71 KB
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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
object CheckCommand "wan-latency" {
import "plugin-check-command"
command = [ PluginContribDir + "/check_wan_latency.py"]
arguments = {
"ip" = {
skip_key = true
order = 0
value = "$wan_ip_addr$"
}
"city" = {
skip_key = true
order = 1
value = "$wan_city_name$"
}
"-w" = {
value = "$wan_avglatw$"
}
"-c" = {
value = "$wan_avglatc$"
}
}
}
apply Service "svc_wan_latency" for (wan_addr => config in host.vars.wan_addresses) {
import "generic-service"
check_command = "wan-latency"
vars.wan_ip_addr = config.wan_ip_address
vars.wan_city_name = config.city
vars.wan_avglatw = config.warning
vars.wan_avglatc = config.critical
name = "wan-latency " + config.wan_ip_address + " (" + config.description + ")"
vars.notification["mail"] = {
groups = ["mailusers"]
}
}
object Host "Wan-Addresses" {
check_command = "check-dummy"
/* remote wan latency checks. key should be unique */
vars.wan_addresses["4.2.2.2_NYC"] = {
description = "New-York -> Upstream VRRP VIP"
wan_ip_address = "4.2.2.2"
city = "New-York"
warning = 7
critical = 10
}
vars.wan_addresses["4.2.2.2_Pitt"] = {
description = "Pittsburgh -> Upstream VRRP VIP"
wan_ip_address = "4.2.2.2"
city = "Pittsburgh"
warning = 25
critical = 40
}
vars.wan_addresses["8.8.8.8_NYC"] = {
description = "New-York -> Upstream VRRP Active"
wan_ip_address = "8.8.8.8"
city = "New-York"
warning = 7
critical = 10
}
vars.wan_addresses["8.8.8.8_Pitt"] = {
description = "Pittsburgh -> Upstream VRRP Acitve"
wan_ip_address = "8.8.8.8"
city = "Pittsburgh"
warning = 25
critical = 40
}
}