Metadata-Version: 2.1
Name: matrix-alertbot
Version: 0.1.2
Summary: A matrix bot to manage alerts from Alertmanager
Home-page: https://gitlab.domainepublic.net/Neutrinet/matrix-alertbot
Project-URL: Documentation, https://gitlab.domainepublic.net/Neutrinet/matrix-alertbot/-/blob/master/README.md
Project-URL: Source, https://gitlab.domainepublic.net/Neutrinet/matrix-alertbot
Project-URL: Tracker, https://gitlab.domainepublic.net/Neutrinet/matrix-alertbot/-/issues
Classifier: License :: OSI Approved :: GNU Affero General Public License v3 or later (AGPLv3+)
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Requires-Python: >=3.9
Description-Content-Type: text/markdown; charset=UTF-8
License-File: LICENSE
Requires-Dist: aiohttp (>=3.8.1)
Requires-Dist: aiohttp-prometheus-exporter (>=0.2.4)
Requires-Dist: aiotools (>=1.5.9)
Requires-Dist: diskcache (>=5.4.0)
Requires-Dist: jinja2 (>=3.1.2)
Requires-Dist: matrix-nio (>=0.19.0)
Requires-Dist: Markdown (>=3.3.7)
Requires-Dist: pytimeparse2 (>=1.4.0)
Requires-Dist: PyYAML (>=5.4.1)
Requires-Dist: typing-extensions (>=4.3.0)
Provides-Extra: all
Requires-Dist: coverage (>=6.4.1) ; extra == 'all'
Requires-Dist: black (>=22.6.0) ; extra == 'all'
Requires-Dist: flake8 (>=4.0.1) ; extra == 'all'
Requires-Dist: flake8-comprehensions (>=3.10.0) ; extra == 'all'
Requires-Dist: isort (>=5.10.1) ; extra == 'all'
Requires-Dist: mypy (>=0.961) ; extra == 'all'
Requires-Dist: pytest (>=7.1.2) ; extra == 'all'
Requires-Dist: pytest-asyncio (>=0.18.3) ; extra == 'all'
Requires-Dist: freezegun (>=1.2.1) ; extra == 'all'
Requires-Dist: types-PyYAML (>=6.0.9) ; extra == 'all'
Requires-Dist: types-setuptools (>=62.6.0) ; extra == 'all'
Requires-Dist: matrix-nio[e2e] (>=0.19.0) ; extra == 'all'
Provides-Extra: e2e
Requires-Dist: matrix-nio[e2e] (>=0.19.0) ; extra == 'e2e'
Provides-Extra: test
Requires-Dist: coverage (>=6.4.1) ; extra == 'test'
Requires-Dist: black (>=22.6.0) ; extra == 'test'
Requires-Dist: flake8 (>=4.0.1) ; extra == 'test'
Requires-Dist: flake8-comprehensions (>=3.10.0) ; extra == 'test'
Requires-Dist: isort (>=5.10.1) ; extra == 'test'
Requires-Dist: mypy (>=0.961) ; extra == 'test'
Requires-Dist: pytest (>=7.1.2) ; extra == 'test'
Requires-Dist: pytest-asyncio (>=0.18.3) ; extra == 'test'
Requires-Dist: freezegun (>=1.2.1) ; extra == 'test'
Requires-Dist: types-PyYAML (>=6.0.9) ; extra == 'test'
Requires-Dist: types-setuptools (>=62.6.0) ; extra == 'test'

# Matrix AlertBot [![Built with matrix-nio](https://img.shields.io/badge/built%20with-matrix--nio-brightgreen)](https://github.com/poljar/matrix-nio) [![coverage report](https://gitlab.domainepublic.net/Neutrinet/matrix-alertbot/badges/master/coverage.svg)](https://gitlab.domainepublic.net/Neutrinet/matrix-alertbot/-/commits/master) 

A bot that receives alert from [Alertmanager](https://prometheus.io/docs/alerting/latest/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](SETUP.md) for how to setup and run the bot.

See [CONTRIBUTING.md](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](https://docs.python.org/3/tutorial/modules.html), 
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](https://pypi.org)) 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!
