Fork of https://gitlab.domainepublic.net/Neutrinet/matrix-alertbot to work while I don't have an account there
Find a file
2022-08-08 17:38:53 +02:00
.github/workflows rename project 2022-06-13 20:55:01 +02:00
docker setup docker deployment 2022-08-08 16:43:05 +02:00
matrix_alertbot setup docker deployment 2022-08-08 16:43:05 +02:00
scripts-dev rename project 2022-06-13 20:55:01 +02:00
tests setup docker deployment 2022-08-08 16:43:05 +02:00
.dockerignore create matrix bot to send and acknowledge alerts 2022-07-04 01:03:24 +02:00
.gitignore setup docker deployment 2022-08-08 16:43:05 +02:00
.gitlab-ci.yml install dependencies in virtual env 2022-08-08 17:38:53 +02:00
config.sample.yaml setup docker deployment 2022-08-08 16:43:05 +02:00
CONTRIBUTING.md Add a SETUP.md file with setup instructions, and link to it from the README 2020-10-05 15:32:57 +01: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
pytest.ini unit tests for command and callbacks ; make alertmanager requests async 2022-07-08 21:11:25 +02:00
README.md cleanup readme 2022-08-08 12:48:56 +02:00
requirements.txt update requirements 2022-07-09 15:25:16 +02:00
setup.cfg update requirements 2022-07-09 15:25:16 +02:00
SETUP.md rename project 2022-06-13 20:55:01 +02:00
setup.py change license from apache v2 to agpl v3 2022-08-08 16:53:36 +02:00

Matrix AlertBot Built with matrix-nio

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 template 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.

sample.config.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!