Fork of https://gitlab.domainepublic.net/Neutrinet/matrix-alertbot to work while I don't have an account there
Find a file
2024-08-04 11:28:13 +02:00
docker feature to send alerts in direct message 2024-08-04 11:08:43 +02:00
matrix_alertbot feature to send alerts in direct message 2024-08-04 11:08:43 +02:00
scripts-dev cleanup and add more linting in gitlab ci 2022-08-13 14:00:40 +02:00
tests feature to send alerts in direct message 2024-08-04 11:08:43 +02:00
.dockerignore include tests in dockerfile 2022-08-08 22:28:58 +02:00
.gitignore fix code coverage report 2024-04-17 16:30:09 +02:00
.gitlab-ci.yml upgrade python version to 3.11 2024-08-04 11:28:13 +02:00
config.sample.yaml feature to send alerts in direct message 2024-08-04 11:08:43 +02:00
CONTRIBUTING.md remove requirements.txt 2022-08-14 15:32:43 +02:00
LICENSE change license from apache v2 to agpl v3 2022-08-08 16:53:36 +02:00
MANIFEST.in remove requirements.txt 2022-08-14 15:32:43 +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 make pipeline fail if code coverage < 75% 2024-04-17 16:41:46 +02:00
README.md format markdown 2022-08-13 13:48:49 +02:00
setup.cfg add more tests 2024-04-17 14:59:37 +02:00
SETUP.md replace command prefix with bot mention 2024-04-18 10:18:37 +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!