blob: b980851a95fbf4be95e335fc941abbb297a240dc (
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
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
|
template Notification "generic-notification" {
types = [
Problem,
Acknowledgement,
Recovery,
Custom,
FlappingStart,
FlappingEnd,
]
}
template Notification "generic-host-notification" {
import "generic-notification"
states = [ Up, Down ]
}
template Notification "generic-service-notification" {
import "generic-notification"
states = [ OK, Warning, Critical, Unknown ]
}
apply Notification "mail" to Host {
import "generic-host-notification"
command = "mail-host-notification"
user_groups = host.vars.notification.mail.groups
users = host.vars.notification.mail.users
interval = 2h
assign where host.vars.notification.mail
}
apply Notification "mail" to Service {
import "generic-service-notification"
command = "mail-service-notification"
user_groups = host.vars.notification.mail.groups
users = host.vars.notification.mail.users
interval = 2h
assign where host.vars.notification.mail
}
apply Notification "telegram" to Host {
import "generic-host-notification"
command = "telegram-host-notification"
user_groups = host.vars.notification.telegram.groups
users = host.vars.notification.telegram.users
interval = 2h
assign where host.vars.notification.telegram
}
apply Notification "telegram" to Service {
import "generic-service-notification"
command = "telegram-service-notification"
user_groups = host.vars.notification.telegram.groups
users = host.vars.notification.telegram.users
interval = 2h
assign where host.vars.notification.telegram
}
|