Fork of https://gitlab.domainepublic.net/Neutrinet/matrix-alertbot to work while I don't have an account there
Find a file
2022-08-14 15:21:47 +02:00
docker cleanup and add more linting in gitlab ci 2022-08-13 14:00:40 +02:00
matrix_alertbot migrate to pyproject.toml and publish to pypi 2022-08-14 15:20:49 +02:00
scripts-dev cleanup and add more linting in gitlab ci 2022-08-13 14:00:40 +02:00
tests fix alertmanager tests 2022-08-08 18:58:08 +02:00
.dockerignore include tests in dockerfile 2022-08-08 22:28:58 +02:00
.gitignore migrate to pyproject.toml and publish to pypi 2022-08-14 15:20:49 +02:00
.gitlab-ci.yml typo 2022-08-14 15:21:47 +02:00
config.sample.yaml setup docker deployment 2022-08-08 16:43:05 +02:00
CONTRIBUTING.md migrate to pyproject.toml and publish to pypi 2022-08-14 15:20:49 +02:00
LICENSE change license from apache v2 to agpl v3 2022-08-08 16:53:36 +02:00
MANIFEST.in setup docker deployment 2022-08-08 16:43:05 +02:00
matrix-alertbot create matrix bot to send and acknowledge alerts 2022-07-04 01:03:24 +02:00
mypy.ini update requirements 2022-07-09 15:25:16 +02:00
pyproject.toml migrate to pyproject.toml and publish to pypi 2022-08-14 15:20:49 +02:00
pytest.ini unit tests for command and callbacks ; make alertmanager requests async 2022-07-08 21:11:25 +02:00
README.md format markdown 2022-08-13 13:48:49 +02:00
requirements.txt add freezegun dependency 2022-08-08 18:04:30 +02:00
setup.cfg migrate to pyproject.toml and publish to pypi 2022-08-14 15:20:49 +02:00
SETUP.md migrate to pyproject.toml and publish to pypi 2022-08-14 15:20:49 +02:00
setup.py migrate to pyproject.toml and publish to pypi 2022-08-14 15:20:49 +02:00

Matrix AlertBot Built with matrix-nio coverage report

A bot that receives alert from Alertmanager to send them to a Matrix room. Users can interract with the bot to create silences for the alerts.

Features include:

  • Send alerts from Alertmanager to a Matrix room
  • Add a reaction to an alert to create a silence until the alert is resolved
  • Reply to an alert to create a silence with a given duration
  • Reply to an alert to create a silence until the alert is resolved
  • Remove silences created through the bot
  • Participation in end-to-end encrypted rooms

Getting started

See SETUP.md for how to setup and run the bot.

See CONTRIBUTING.md for how to contribute to the project.

Project structure

The majority of the code is kept inside of the matrix_alertbot folder, which is in itself a python package, the __init__.py file inside declaring it as such.

To run the bot, the matrix-alertbot script in the root of the codebase is available. It will import the main function from the main.py file in the package and run it. To properly install this script into your python environment, run pip install -e . in the project's root directory.

setup.py contains package information (for publishing the code to PyPI) and setup.cfg just contains some configuration options for linting tools.

config.sample.yaml is a sample configuration file. You should copy this file to config.yaml , then edit it according to your needs. Be sure never to check the edited config.yaml into source control since it'll likely contain sensitive details such as passwords!