All Projects → jaywink → matrix-alertmanager

jaywink / matrix-alertmanager

Licence: MIT license
A bot to receive Alertmanager webhook events and forward them to chosen rooms.

Programming Languages

javascript
184084 projects - #8 most used programming language
shell
77523 projects
Dockerfile
14818 projects

Projects that are alternatives of or similar to matrix-alertmanager

PollMaubot
A polling plugin for Riot (using maubot)
Stars: ✭ 18 (-63.27%)
Mutual labels:  matrix
combining3Dmorphablemodels
Project Page of Combining 3D Morphable Models: A Large scale Face-and-Head Model - [CVPR 2019]
Stars: ✭ 80 (+63.27%)
Mutual labels:  matrix
Matrix-EmailBridge
A bridge written in Golang to receive and write emails in matrix
Stars: ✭ 101 (+106.12%)
Mutual labels:  matrix
mx-puppet-teams
Microsoft Teams puppeting bridge for Matrix
Stars: ✭ 30 (-38.78%)
Mutual labels:  matrix
Alertmanager
Alertmanager for macOS.
Stars: ✭ 49 (+0%)
Mutual labels:  alertmanager
signin-with-matrix
Federated sign-in component for your web app (using Matrix)
Stars: ✭ 207 (+322.45%)
Mutual labels:  matrix
linalg
Linear algebra library based on LAPACK
Stars: ✭ 42 (-14.29%)
Mutual labels:  matrix
telegram
A Matrix-Telegram hybrid puppeting/relaybot bridge
Stars: ✭ 914 (+1765.31%)
Mutual labels:  matrix
tabula
A Go library for working with rows, columns, or matrix (deprecated, see https://github.com/shuLhan/share/tree/master/lib/tabula).
Stars: ✭ 11 (-77.55%)
Mutual labels:  matrix
abacus
📐 C# cross precision 3D maths library.
Stars: ✭ 35 (-28.57%)
Mutual labels:  matrix
Transform
Base Monogame objects for managing relative transforms.
Stars: ✭ 19 (-61.22%)
Mutual labels:  matrix
matrix-sms-bridge
Matrix bridge, that allows you to bridge matrix rooms to SMS with one telephone number only.
Stars: ✭ 62 (+26.53%)
Mutual labels:  matrix
SCNMathExtensions
Math extensions for SCNVector3, SCNQuaternion, SCNMatrix4
Stars: ✭ 32 (-34.69%)
Mutual labels:  matrix
MachineLearning
An easy neural network for Java!
Stars: ✭ 125 (+155.1%)
Mutual labels:  matrix
craft3-blockonomicon
Manage matrix fields on a per-block basis. Bundle presentation with blocks. Render entire matrices with a single line.
Stars: ✭ 32 (-34.69%)
Mutual labels:  matrix
PrometheusWithGrafana
Setup Prometheus with Grafana dashboard using Ansible
Stars: ✭ 50 (+2.04%)
Mutual labels:  alertmanager
ligh7hau5
A Matrix (https://matrix.org/docs/spec/) to Fediverse / ActivityPub client / bridge. Also, some media proxying.
Stars: ✭ 26 (-46.94%)
Mutual labels:  matrix
Mathematics for Machine Learning
Notes and step-by-step exercises resolution to aid students learning the base math for machine learning. Content summed up from the the course from the Imperial London College in Coursera.
Stars: ✭ 44 (-10.2%)
Mutual labels:  matrix
matrix.js
Where Matrices become heroes together
Stars: ✭ 31 (-36.73%)
Mutual labels:  matrix
matrix-chart
Helm chart for deploying a Matrix homeserver stack
Stars: ✭ 83 (+69.39%)
Mutual labels:  matrix

Matrix-Alertmanager

A bot to receive Prometheus Alertmanager webhook events and forward them to chosen rooms.

Main features:

  • Uses pre-created Matrix user to send alerts using token auth.
  • Configurable room per alert receiver.
  • Automatic joining of configured rooms. Private rooms require an invite.
  • Secret key authentication with Alertmanager.
  • HTML formatted messages.
  • Optionally mentions @room on firing alerts

How to use

Configuration

Whether running manually or via the Docker image, the configuration is set via environment variables. When running manually, copy .env.default into .env, set the values and they will be loaded automatically. When using the Docker image, set the environment variables when running the container.

Docker

The Docker image jaywink/matrix-alertmanager:latest is the easiest way to get the service running. Ensure you set the required environment variables listed in .env.default in this repository.

Alertmanager

You will need to configure a webhook receiver in Alertmanager. It should looks something like this:

receivers:
- name: 'myreceiver'
  webhook_configs:
  - url: 'https://my-matrix-alertmanager.tld/alerts?secret=veryverysecretkeyhere'

The secret key obviously should match the one in the alertmanager configuration.

Prometheus rules

Add some styling to your prometheus rules

rules:
- alert: High Memory Usage of Container
  annotations:
    description: Container named <strong>{{\$labels.container_name}}</strong> in <strong>{{\$labels.pod_name}}</strong> in <strong>{{\$labels.namespace}}</strong> is using more than 75% of Memory Limit
  expr: |
    ((( sum(container_memory_usage_bytes{image!=\"\",container_name!=\"POD\", namespace!=\"kube-system\"}) by (namespace,container_name,pod_name, instance)  / sum(container_spec_memory_limit_bytes{image!=\"\",container_name!=\"POD\",namespace!=\"kube-system\"}) by (namespace,container_name,pod_name, instance) ) * 100 ) < +Inf ) > 75
  for: 5m
  labels:
    team: dev

NOTE! Currently, the bot cannot talk HTTPS, so you need to have a reverse proxy in place to terminate SSL, or use unsecure unencrypted connections.

TODO

  • Registering an account instead of having to use an existing account

Tech

Node 18, Express, Matrix JS SDK

Help

Come chat in the https://matrix.to/#/#matrix-alertmanager:federator.dev room!

Author

Jason Robinson / https://jasonrobinson.me / @jaywink:federator.dev

License

MIT

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].