Matrix plugin for Alerta
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Magnus Walbeck 146b3ec652
Add LICENSE file
7 months ago
LICENSE Add LICENSE file 7 months ago
README.md Add README and allow only m.text and m.notice message types using config option notice and text 12 months ago
alerta_matrix.py Bump version to v0.1.0 12 months ago
setup.py Bump version to v0.1.0 12 months ago

README.md

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.