30 lines
1.1 KiB
INI
30 lines
1.1 KiB
INI
|
// https://git.dittberner.info/jan/icinga2-matrix-notification
|
||
|
/**
|
||
|
* Example Matrix.org apply rules.
|
||
|
* The "!<id>:matrix.org" needs to be replaced with the room ID
|
||
|
* for example "!SDFfskjfdszhdaslasdkjhdasd:matrix.org".
|
||
|
* Also a Matrix access token is required too.
|
||
|
*/
|
||
|
|
||
|
apply Notification "Matrix host problems" to Host {
|
||
|
import "matrix-host-notification"
|
||
|
|
||
|
user_groups = host.vars.notification.matrix.groups
|
||
|
users = host.vars.notification.matrix.users
|
||
|
vars.notification_matrix_server = "https://matrix.org"
|
||
|
vars.notification_matrix_room_id = "!<id>:matrix.org"
|
||
|
// vars.notification_matrix_token = "<access_token>"
|
||
|
assign where host.vars.notification.matrix
|
||
|
}
|
||
|
|
||
|
apply Notification "Matrix service problems" to Service {
|
||
|
import "matrix-service-notification"
|
||
|
|
||
|
user_groups = host.vars.notification.matrix.groups
|
||
|
users = host.vars.notification.matrix.users
|
||
|
vars.notification_matrix_server = "https://matrix.org"
|
||
|
vars.notification_matrix_room_id = "!<id>:matrix.org"
|
||
|
// vars.notification_matrix_token = "<access_token>"
|
||
|
assign where host.vars.notification.matrix
|
||
|
}
|