Add revisions to Matrix doc (#9295)
Joel Hans committed
Jun 8, 2020 at 09:53 UTC
ecd9c48238a4db2ab6ef2bb4e98d75093773df69
1 file changed
+25
-9
health/notifications/matrix/README.md
+25
-9
@@ -1,24 +1,38 @@
1
+<!--
2
+title: "Send Netdata notifications to Matrix network rooms"
3
+description: "Stay aware of warning or critical anomalies by sending health alarms to Matrix network rooms with Netdata's health monitoring watchdog."
4
+sidebar_label: "Matrix"
5
+custom_edit_url: https://github.com/netdata/netdata/edit/master/health/notifications/matrix/README.md
6
+-->
7
+
8
# Matrix
9
10
Send notifications to [Matrix](https://matrix.org/) network rooms.
11
12
The requirements for this notification method are:
6
-1. The url of the homeserver (`https://homeserver:port`)
7
-2. Credentials for connecting to the homeserver, in the form of a valid access token for your account (or for a dedicated notification account). These tokens usually don't expire.
8
-3. The room ids that you want to sent the notification to.
13
10
-To obtain the access token you can use the following curl command:
11
-```
14
+1. The url of the homeserver (`https://homeserver:port`).
15
+2. Credentials for connecting to the homeserver, in the form of a valid access token for your account (or for a
16
+ dedicated notification account). These tokens usually don't expire.
17
+3. The room ids that you want to sent the notification to.
18
+
19
+To obtain the access token, you can use the following `curl` command:
20
+
21
+```bash
22
curl -XPOST -d '{"type":"m.login.password", "user":"example", "password":"wordpass"}' "https://homeserver:8448/_matrix/client/r0/login"
23
```
24
15
-The room ids are unique identifiers and can be obtained from the room settings in a Matrix client (e.g. Riot). Their format is !uniqueid:homeserver.
25
+The room ids are unique identifiers and can be obtained from the room settings in a Matrix client (e.g. Riot). Their
26
+format is `!uniqueid:homeserver`.
27
+
28
Multiple room ids can be defined by separating with a space character.
29
18
-Detailed information about the Matrix client API is available at the official [site](https://matrix.org/docs/guides/client-server.html)
30
+Detailed information about the Matrix client API is available at the [official
31
+site](https://matrix.org/docs/guides/client-server.html).
32
20
-Your health_alarm_notify.conf should look like this:
21
-```
33
+Your `health_alarm_notify.conf` should look like this:
34
+
35
+```conf
36
###############################################################################
37
# Matrix notifications
38
#
@@ -40,3 +54,5 @@ MATRIX_ACCESSTOKEN="XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
54
# The format is !roomid:homeservername
55
DEFAULT_RECIPIENT_MATRIX="!XXXXXXXXXXXX:matrix.org"
56
```
57
+
58
+[](<>)