alerta_alerta-contrib/plugins/matrix
Nick Satterly 2a6632b78f Fix multiple linting errors 2023-03-21 00:15:34 +01:00
..
README.md feat: add plugin for Matrix notifications (#341) 2021-04-18 21:14:21 +02:00
alerta_matrix.py Fix multiple linting errors 2023-03-21 00:15:34 +01:00
setup.py Fix multiple linting errors 2023-03-21 00:15:34 +01:00

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.