{"id":15640596,"url":"https://github.com/jaywink/matrix-alertmanager","last_synced_at":"2025-07-10T20:11:35.924Z","repository":{"id":35615437,"uuid":"162926114","full_name":"jaywink/matrix-alertmanager","owner":"jaywink","description":"A bot to receive Alertmanager webhook events and forward them to chosen rooms.","archived":false,"fork":false,"pushed_at":"2024-09-14T23:08:50.000Z","size":337,"stargazers_count":80,"open_issues_count":9,"forks_count":22,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-06-04T08:00:04.190Z","etag":null,"topics":["alertmanager","bot","matrix","monitoring","prometheus","webhook-receiver"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jaywink.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-12-23T21:47:30.000Z","updated_at":"2025-05-27T22:15:34.000Z","dependencies_parsed_at":"2024-10-22T18:16:28.778Z","dependency_job_id":null,"html_url":"https://github.com/jaywink/matrix-alertmanager","commit_stats":{"total_commits":86,"total_committers":12,"mean_commits":7.166666666666667,"dds":"0.33720930232558144","last_synced_commit":"eb42758bdb5b2c11622630d62037a1e08881fb99"},"previous_names":[],"tags_count":12,"template":false,"template_full_name":null,"purl":"pkg:github/jaywink/matrix-alertmanager","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jaywink%2Fmatrix-alertmanager","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jaywink%2Fmatrix-alertmanager/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jaywink%2Fmatrix-alertmanager/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jaywink%2Fmatrix-alertmanager/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jaywink","download_url":"https://codeload.github.com/jaywink/matrix-alertmanager/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jaywink%2Fmatrix-alertmanager/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264648521,"owners_count":23643669,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["alertmanager","bot","matrix","monitoring","prometheus","webhook-receiver"],"created_at":"2024-10-03T11:38:15.821Z","updated_at":"2025-07-10T20:11:35.882Z","avatar_url":"https://github.com/jaywink.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![](https://img.shields.io/docker/pulls/jaywink/matrix-alertmanager.svg)](https://cloud.docker.com/u/jaywink/repository/docker/jaywink/matrix-alertmanager) [![](https://img.shields.io/matrix/matrix-alertmanager:federator.dev.svg?server_fqdn=federator.dev)](https://matrix.to/#/#matrix-alertmanager:federator.dev)\n\n# Matrix-Alertmanager\n\n![](./screenshot.png)\n\nA bot to receive Prometheus Alertmanager webhook events and forward them to chosen rooms.\n\nMain features:\n\n* Uses pre-created Matrix user to send alerts using token auth.\n* Configurable room per alert receiver.\n* Automatic joining of configured rooms. Private rooms require an invite.\n* Secret key authentication with Alertmanager.\n* HTML formatted messages.\n* Optionally mentions `@room` on firing alerts\n\n## How to use\n\n### Configuration\n\nWhether running manually or via the Docker image, the configuration is set \nvia environment variables. When running manually, copy `.env.default`\ninto `.env`, set the values and they will be loaded automatically. \nWhen using the Docker image, set the environment variables when running \nthe container.\n\n### Docker\n\nThe [Docker image](https://cloud.docker.com/repository/docker/jaywink/matrix-alertmanager) `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.\n\n### Alertmanager\n\nYou will need to configure a webhook receiver in Alertmanager. It should looks something like this:\n\n```yaml\nreceivers:\n- name: 'myreceiver'\n  webhook_configs:\n  - url: 'https://my-matrix-alertmanager.tld/alerts?secret=veryverysecretkeyhere'\n```\n\nThe secret key obviously should match the one in the alertmanager configuration.\n\nAlternatively, put the secret in a separate file and use basic auth with username `alertmanager`:\n\n```yaml\nreceivers:\n- name: 'myreceiver'\n  webhook_configs:\n  - url: 'https://my-matrix-alertmanager.tld/alerts'\n    http_config:\n      basic_auth:\n        username: alertmanager\n        password_file: /path/to/password.secret\n```\n\n### Prometheus rules\n\nAdd some styling to your prometheus rules\n\n```yaml\nrules:\n- alert: High Memory Usage of Container\n  annotations:\n    description: Container named \u003cstrong\u003e{{\\$labels.container_name}}\u003c/strong\u003e in \u003cstrong\u003e{{\\$labels.pod_name}}\u003c/strong\u003e in \u003cstrong\u003e{{\\$labels.namespace}}\u003c/strong\u003e is using more than 75% of Memory Limit\n  expr: |\n    ((( 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 ) \u003c +Inf ) \u003e 75\n  for: 5m\n  labels:\n    team: dev\n```\n\nNOTE! Currently, the bot cannot talk HTTPS, so you need to have a reverse proxy in place to terminate SSL, or use unsecure unencrypted connections.\n\n## TODO\n\n* Registering an account instead of having to use an existing account\n\n## Tech\n\nNode 20, Express, Matrix JS SDK\n\n## Help\n\nCome chat in the https://matrix.to/#/#matrix-alertmanager:federator.dev room!\n\n## Author\n\nJason Robinson / https://jasonrobinson.me / @jaywink:federator.dev\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjaywink%2Fmatrix-alertmanager","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjaywink%2Fmatrix-alertmanager","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjaywink%2Fmatrix-alertmanager/lists"}