Bridge to send Prometheus AlertManager alerts to Free Mobile SMS API.
- โ๏ธ Receive alerts from Prometheus AlertManager
- ๐ฒ Automatic SMS sending via Free Mobile API
- ๐ Optional SMS logging to database (SQLite or MariaDB)
- ๐ณ Ready to deploy with Docker
- โก Lightweight and performant (based on Bun and Elysia)
- A Free Mobile account with the "SMS Notifications" option enabled
- Get your API credentials:
- Login to your Free Mobile account
- Go to Mes Options โ Notifications par SMS
- Enable the option and note your API key
Create a docker-compose.yml file:
services:
alert-manager-free-mobile:
image: ghcr.io/piarre/alert-manager-free-mobile:latest
container_name: alert-manager-free-mobile
restart: unless-stopped
ports:
- "2025:2025"
environment:
- FREE_MOBILE_USER=33612345678
- FREE_MOBILE_PASS=your_api_key
- LOG_SMS=true
# Option 1: SQLite (default)
- LOG_DB_URI=sqlite://app/sms.db
# Option 2: MariaDB/MySQL
# - LOG_DB_URI=mariadb://user:password@mariadb:3306/sms_logs
volumes:
# SQLite persistence (uncomment if using SQLite)
- ./data:/appStart the service:
docker-compose up -ddocker run -d \
--name alert-manager-free-mobile \
--restart unless-stopped \
-p 2025:2025 \
-e FREE_MOBILE_USER=33612345678 \
-e FREE_MOBILE_PASS=your_api_key \
-e LOG_SMS=true \
-e LOG_DB_URI=sqlite://app/sms.db \
-v $(pwd)/data:/app \
ghcr.io/piarre/alert-manager-free-mobile:latestIn your alertmanager.yml, add the following configuration:
route:
receiver: 'free-mobile-sms'
group_wait: 10s
group_interval: 10s
repeat_interval: 1h
receivers:
- name: 'free-mobile-sms'
webhook_configs:
- url: 'http://alert-manager-free-mobile:2025/sms/send'
send_resolved: trueReceives alerts from AlertManager and sends an SMS.
Example payload:
{
"alerts": [
{
"status": "firing",
"labels": {
"alertname": "InstanceDown",
"instance": "server01:9100",
"severity": "critical"
},
"annotations": {
"summary": "Instance is DOWN"
}
}
]
}Retrieve SMS history (only if LOG_SMS=true).
curl http://localhost:2025/sms/log400: Missing or invalid parameters402: Too many SMS sent (limit of 250/day)403: Service not enabled or incorrect credentials500: Free Mobile server error