-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathservices.conf
78 lines (58 loc) · 1.81 KB
/
services.conf
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
/*
* Service apply rules.
*
* Tip: Use `icinga2 object list --type Service` to
* list all service objects after running
* configuration validation (`icinga2 daemon -C`).
*/
apply Service for (interface => config in host.vars.snmp_interfaces) {
import "generic-service"
display_name = "Network traffic on " + config.snmp_interface_label
check_command = "snmp-interface"
vars.snmp_interface_bits_bytes = "true"
vars.snmp_interface_megabytes = "true"
vars.snmp_interface_noregexp = "true"
vars.snmp_warncrit_percent = "true"
vars.snmp_warn = "100,100"
vars.snmp_crit = "100,100"
vars += config
assign where host.vars.snmp_address
}
apply Service "snmp-load" {
import "generic-service"
display_name = "CPU load: 1, 5, 15 minutes averages"
check_command = "snmp-load"
vars.snmp_load_type = "netsl"
vars.snmp_warn = "5,3,2"
vars.snmp_crit = "6,5,3"
assign where host.vars.snmp_address
}
apply Service "snmp-memory" {
import "generic-service"
display_name = "Memory in use"
check_command = "snmp-memory"
vars.snmp_warn = "70,0"
vars.snmp_crit = "90,0"
assign where host.vars.snmp_address
}
apply Service "snmp-storage" {
import "generic-service"
display_name = "Disk space in use"
check_command = "snmp-storage"
vars.snmp_warn = "70"
vars.snmp_crit = "90"
assign where host.vars.snmp_address
}
apply Service for (command => config in host.vars.snmpv3_commands) {
import "generic-service"
display_name = config.display_name
check_command = "snmpv3"
vars.snmpv3_seclevel = "authPriv"
vars.snmpv3_auth_alg = "sha"
vars.snmpv3_priv_alg = "aes"
vars.snmpv3_user = host.vars.snmp_login
vars.snmpv3_auth_key = host.vars.snmp_password
vars.snmpv3_priv_key = host.vars.snmp_privpass
vars += config
assign where host.vars.snmp_address && host.vars.snmp_v3
}