-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathcommands-xmppnotify.conf
97 lines (89 loc) · 2.27 KB
/
commands-xmppnotify.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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
template NotificationCommand "xmpp-notification-base" {
command = [ ConfigDir + "/scripts/xmppnotify.py" ]
arguments += {
"-6" = "$notification_address6$"
"-b" = "$notification_author$"
"-c" = "$notification_comment$"
"-d" = {
required = true
value = "$notification_date$"
}
"-i" = "$notification_icingaweb2url$"
"-l" = {
required = true
value = "$notification_hostname$"
}
"-n" = {
required = true
value = "$notification_hostdisplayname$"
}
"-r" = {
required = true
value = "$notification_useremail$"
}
"-t" = {
required = true
value = "$notification_type$"
}
}
vars += {
notification_address = "$address$"
notification_address6 = "$address6$"
notification_author = "$notification.author$"
notification_comment = "$notification.comment$"
notification_type = "$notification.type$"
notification_date = "$icinga.long_date_time$"
notification_hostname = "$host.name$"
notification_hostdisplayname = "$host.display_name$"
notification_useremail = "$user.vars.xmpp$"
}
}
object NotificationCommand "xmpp-host-notification" {
import "xmpp-notification-base"
arguments += {
"-4" = {
required = true
value = "$notification_address$"
}
"-o" = {
required = true
value = "$notification_hostoutput$"
}
"-s" = {
required = true
value = "$notification_hoststate$"
}
}
vars += {
notification_hostoutput = "$host.output$"
notification_hoststate = "$host.state$"
}
}
object NotificationCommand "xmpp-service-notification" {
import "xmpp-notification-base"
arguments += {
"-4" = "$notification_address$"
"-e" = {
required = true
value = "$notification_servicename$"
}
"-o" = {
required = true
value = "$notification_serviceoutput$"
}
"-s" = {
required = true
value = "$notification_servicestate$"
}
"-u" = {
required = true
value = "$notification_servicedisplayname$"
}
}
vars += {
notification_servicename = "$service.name$"
notification_serviceoutput = "$service.output$"
notification_servicestate = "$service.state$"
notification_servicedisplayname = "$service.display_name$"
}
}