Example bot (docker compose config)
services:
prometheus_telegram_bot:
image: longvunguyen1511/prometheus-telegram-bot:latest
container_name: prometheus_telegram_bot
restart: ${RESTART_MODE}
environment:
- PROMETHEUS_URL=http://prometheus:9090
- TELEGRAM_BOT_TOKEN=${PRIVATE_TELEGRAM_BOT_TOKEN}
- TELEGRAM_CHANNEL_ID=${PRIVATE_TELEGRAM_CHANNEL_ID}
In telegram, send "/latest" to get the latest status. Example output:
--- localpc ---
CPU: 3.3%
Clock: N/A
platform_coretemp_0: avg 44.0C | min 34.0C | max 54.0C
platform_it87_656: avg 9.7C | min -46.0C | max 38.0C
thermal_thermal_zone0: avg 40.0C | min 40.0C | max 40.0C
thermal_thermal_zone1: avg 36.0C | min 36.0C | max 36.0C
Fan: avg 574 | min 0 | max 1721 RPM
RAM: 0.9GB / 3.9GB (22%)
Swap: 0.0GB / 1.0GB (1%)
Disk /dev/sdb1 [/]
11.4GB / 71.9GB (16%) | R: 6.1KB/s | W: 15.6KB/s
Disk /dev/sdb1 [/etc/hostname]
11.4GB / 71.9GB (16%) | R: 6.1KB/s | W: 15.6KB/s
Disk /dev/sdb1 [/etc/hosts]
11.4GB / 71.9GB (16%) | R: 6.1KB/s | W: 15.6KB/s
Disk /dev/sdb1 [/etc/resolv.conf]
11.4GB / 71.9GB (16%) | R: 6.1KB/s | W: 15.6KB/s
GPU: N/A
Content type
Image
Digest
sha256:719e8ae3a…
Size
49.2 MB
Last updated
3 months ago
docker pull longvunguyen1511/prometheus-telegram-bot