Send Zabbix alerts to MAX via HTTP API.
Replacement for Telegram notifications in restricted environments.
bash pip install -r requirements.txt
-
Copy scripts to: /usr/lib/zabbix/alertscripts
-
Make them executable: bash chmod +x /usr/lib/zabbix/alertscripts/*.py
-
Set bot token: ini [Service] Environment="MAX_BOT_TOKEN=YOUR_TOKEN"
-
Restart Zabbix: bash sudo systemctl daemon-reexec sudo systemctl daemon-reload sudo systemctl restart zabbix-server
-
Get your chat_id: bash export MAX_BOT_TOKEN=YOUR_TOKEN ./get_user_id.py
-
Configure Zabbix Media type: {ALERT.SENDTO} {ALERT.SUBJECT} {ALERT.MESSAGE}
- Python 3.6+
- requests
- get_user_id.py โ fetches updates to obtain chat_id
- zabbix_max_http.py โ sends alerts to MAX
- Type: Script
- Script name: zabbix_max_http.py
User media:
- Send to: chat_id
bash export MAX_BOT_TOKEN=YOUR_TOKEN ./zabbix_max_http.py 123456789 "Test subject" "Test message"
- MAX_BOT_TOKEN is not set
- chat_id must be integer
- MAX API error
- Uses MAX HTTP API
- No Telegram dependency
- Minimal and dependency-light
MI