Matrix plugin for Alerta
Go to file
2021-06-20 18:45:01 +02:00
alerta_matrix.py Bump version to v0.1.0 2021-01-31 17:42:14 +01:00
LICENSE Add LICENSE file 2021-06-20 18:45:01 +02:00
README.md Add README and allow only m.text and m.notice message types using config option notice and text 2021-01-28 17:16:12 +01:00
setup.py Bump version to v0.1.0 2021-01-31 17:42:14 +01:00

Matrix Plugin

Send Matrix messages for new alerts.

Installation

Clone the GitHub repo and run:

$ python setup.py install

Or, to install remotely from GitHub run:

$ pip install git+https://github.com/alerta/alerta-contrib.git#subdirectory=plugins/matrix

Note: If Alerta is installed in a python virtual environment then plugins need to be installed into the same environment for Alerta to dynamically discover them.

Configuration

Add matrix to the list of enabled PLUGINS in alertad.conf server configuration file and set plugin-specific variables either in the server configuration file or as environment variables.

PLUGINS = ['matrix']
MATRIX_HOMESERVER = ''    # default="not set"
MATRIX_ROOM = ''          # default="not set"
MATRIX_ACCESS_TOKEN = ''  # default="not set"
MATRIX_MESSAGE_TYPE = ''  # default="notice" | can be "notice" or "text"

The DASHBOARD_URL setting should be configured to link matrix messages to the Alerta console:

DASHBOARD_URL = ''  # default="not set"

Example

PLUGINS = ['reject','matrix']
MATRIX_HOMESERVER = 'https://matrix.org'
MATRIX_ROOM = '!VMKjBnKVghpiiBqwjEg:matrix.org'
MATRIX_ACCESS_TOKEN = '4yHuHptP2crTWvLdzUzvhPmoArz6mLTqN9DnpvY5mFDLEW8yxWEJLU8kg6nLUdDcxHS6SwXNrchKM2pmscgoAue2XxUfCrhWBtGtP7QtECTtQiE6h4HuSGu6Vj8F9Zdge'
MATRIX_MESSAGE_TYPE = 'notice'
DASHBOARD_URL = 'https://try.alerta.io'

References

License

Copyright (c) 2021 Magnus Walbeck. Available under the MIT License.