No description
- Go 75.5%
- Svelte 17.6%
- TypeScript 5.1%
- Makefile 1%
- Dockerfile 0.6%
- Other 0.2%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
The registry no longer serves the tag this deployment pins, so the workload survives only on a containerd cache and dies on any reschedule. The repository had also lost its REGISTRY_TOKEN secret, which made the build fail at the Fetch source step with HTTP 403. The secret is restored; this empty commit triggers the workflow, which has no workflow_dispatch trigger. Claude-Session: https://claude.ai/code/session_01Hao2WtqHGEkW2o7vvMdvdL |
||
| .forgejo/workflows | ||
| .github/workflows | ||
| api/proto | ||
| cmd/vmalert-whatsapp | ||
| configs | ||
| docs | ||
| internal | ||
| k8s | ||
| web | ||
| .air.toml | ||
| .gitignore | ||
| buf.gen.yaml | ||
| buf.lock | ||
| buf.yaml | ||
| CLAUDE.md | ||
| config.yaml.example | ||
| Containerfile | ||
| go.mod | ||
| go.sum | ||
| Makefile | ||
| README.md | ||
vmalert-whatsapp
Receives Alertmanager webhook alerts, displays them in a real-time web dashboard, and forwards them to WhatsApp contacts.
Quick Start
# Build
make build
# Run
./bin/vmalert-whatsapp serve
Open http://localhost:8084 for the dashboard. Go to Settings to connect WhatsApp via QR code and add contacts.
Send a Test Alert
Send a firing alert to the webhook endpoint. This will appear on the dashboard and be forwarded to all enabled WhatsApp contacts:
curl -X POST http://localhost:8084/api/v1/alerts \
-H "Content-Type: application/json" \
-d '{
"status": "firing",
"alerts": [
{
"status": "firing",
"labels": {
"alertname": "HighMemoryUsage",
"severity": "critical",
"instance": "server-01:9090"
},
"annotations": {
"summary": "Memory usage is above 90%",
"description": "server-01 memory usage has been above 90% for the last 5 minutes."
},
"startsAt": "2024-01-15T10:00:00Z",
"generatorURL": "http://prometheus:9090/graph?g0.expr=node_memory_usage",
"fingerprint": "abc123"
}
]
}'
Send a resolved alert:
curl -X POST http://localhost:8084/api/v1/alerts \
-H "Content-Type: application/json" \
-d '{
"status": "resolved",
"alerts": [
{
"status": "resolved",
"labels": {
"alertname": "HighMemoryUsage",
"severity": "critical",
"instance": "server-01:9090"
},
"annotations": {
"summary": "Memory usage is back to normal"
},
"startsAt": "2024-01-15T10:00:00Z",
"endsAt": "2024-01-15T10:15:00Z",
"generatorURL": "http://prometheus:9090/graph?g0.expr=node_memory_usage",
"fingerprint": "abc123"
}
]
}'
Configuration
Copy config.yaml.example and edit as needed:
cp config.yaml.example config.yaml
| Setting | Default | Description |
|---|---|---|
server.addr |
:8084 |
Listen address |
server.shutdown_timeout |
10s |
Graceful shutdown timeout |
hub.ring_size |
1000 |
Alert history buffer size |
webhook.max_body_bytes |
1048576 |
Max webhook payload size |
database.path |
vmalert-whatsapp.db |
SQLite database file path |
All settings can be overridden via environment variables with the VMALERT_WHATSAPP_ prefix (e.g., VMALERT_WHATSAPP_SERVER_ADDR=:9090).
