Alerter
Telegram and Matrix bot for alerts from Alertmanager
Install / Use
/learn @ultram4rine/AlerterREADME
Alerter
Telegram and Matrix bot for alerts from Alertmanager
Usage
Telegram preparations
Matrix preparations
-
Create user under which
alerterwill work. -
Add this user to room for alerts and get
room_id.
After preparations:
-
Configure
alerter. -
Optionally check that messages are being sent and formatted correctly using this script:
./test.sh tgOr
./test.sh matrix -
Add
alertertoreceiversin your alertmanager.yml:receivers: - name: alerter_tg webhook_configs: - send_resolved: true url: "http://127.0.0.1:3030/tg" - name: alerter_matrix webhook_configs: - send_resolved: true url: "http://127.0.0.1:3030/matrix"
Templating
You can modify default templates for your needs, they are in Handlebars format. For Telegram alerter uses HTML style and for Matrix Markdown style.
Installation
Prebuilt packages
You can download prebuilt archive or Deb/RPM package from releases.
Docker
Pull image from DockerHub:
docker pull ultram4rine/alerter
In other cases, you need Rust installed.
Crates.io
You can install alerter from crates.io:
cargo install alerter
Then download needed template and run.
Build from source
-
Clone repository:
git clone https://github.com/ultram4rine/alerter.git cd alerter -
Build binary:
cargo build --release -
Binary should be in
target/release/alerter.
Build Deb or RPM package
See cargo-deb or cargo-generate-rpm instructions respectively.
Configuration
Use environment variables or command-line flags to configure alerter:
| Environment variable | Command-line flag | Default | Description | | ------------------------ | ---------------------- | ---------------------------- | ------------------------------------------------------------------------- | | ALERTER_LISTEN_PORT | --port (-p) | 3030 | Port to listen. | | | --tg | | Enable Telegram support. | | ALERTER_TG_BOT_TOKEN | --tg-token | | Telegram bot token. Required for Telegram support. | | ALERTER_TG_CHAT_ID | --tg-chat-id | | Telegram chat ID. Required for Telegram support. | | ALERTER_TG_TMPL_PATH | --tg-template-path | templates/default.tg.hbs | Path to handlebars template file. Required for Telegram support. | | | --matrix | | Enable Matrix support. | | ALERTER_MATRIX_USERNAME | --matrix-user | | Matrix username. Required for Matrix support. | | ALERTER_MATRIX_PASSWORD | --matrix-pass | | Matrix password. Required for Matrix support. | | ALERTER_MATRIX_ROOM_ID | --matrix-room-id | | Matrix room id. Required for Matrix support. | | ALERTER_MATRIX_TMPL_PATH | --matrix-template-path | templates/default.matrix.hbs | Path to handlebars template file for Matrix. Required for Matrix support. |
Related Skills
himalaya
352.9kCLI to manage emails via IMAP/SMTP. Use `himalaya` to list, read, write, reply, forward, search, and organize emails from the terminal. Supports multiple accounts and message composition with MML (MIME Meta Language).
node-connect
352.9kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
taskflow
352.9kname: taskflow description: Use when work should span one or more detached tasks but still behave like one job with a single owner context. TaskFlow is the durable flow substrate under authoring layer
frontend-design
111.5kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
