Docker Containers Monitor with Web UI & Telegram Alerts
650
Image: remotecellist/dockalert-telegram:latest (or replace latest with a specific version tag like 1.1.0)
Dockalert-Telegram is a self-hosted application that monitors your Docker container events and sends real-time notifications via Telegram. It includes a web-based UI to view container statuses, manage which containers are monitored, view logs, and configure application settings.
@BotFather on Telegram./newbot command.@userinfobot to get your Chat ID./my_id @your_bot_username in the group. Then check your bot's updates (e.g., https://api.telegram.org/bot<YOUR_BOT_TOKEN>/getUpdates) to find the group's chat ID (it will be a negative number).getent group dockerdocker:x:GID_NUMBER:. Note the GID_NUMBER.This is the recommended method for a straightforward setup:
docker-compose.yml file with the following content (replace placeholders with your actual values):version: '3.8'
services:
webapp:
image: remotecellist/dockalert-telegram:latest
container_name: dockalert-telegram-webapp
restart: unless-stopped
ports:
- "5000:5000"
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
- monitor_config_data:/config
environment:
- TELEGRAM_BOT_TOKEN=your_actual_telegram_bot_token_here
- TELEGRAM_CHAT_ID=your_actual_chat_id_here
- FLASK_SECRET=your_secret_key_here
- FLASK_USER=admin
- FLASK_PASSWORD=your_secure_password_here
- FLASK_DEBUG=0
- FLASK_RUN_PORT=5000
- MONITORED_FILE=/config/monitored.json
- APP_CONFIG_FILE=/config/app_config.json
- LOG_LINES=5
user: "1000:1000" # Replace with your Docker host's docker UID
group_add:
- "your_docker_host_gid_here"
command: python -m simple_monitor.webapp
monitor:
image: remotecellist/dockalert-telegram:latest
container_name: dockalert-telegram-monitor
restart: unless-stopped
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
- monitor_config_data:/config
environment:
- TELEGRAM_BOT_TOKEN=your_actual_telegram_bot_token_here
- TELEGRAM_CHAT_ID=your_actual_chat_id_here
- MONITORED_FILE=/config/monitored.json
- APP_CONFIG_FILE=/config/app_config.json
- LOG_LINES=5
user: "1000:1000" # Replace with your Docker host's docker UID
group_add:
- "your_docker_host_gid_here"
command: python -m simple_monitor.monitor
volumes:
monitor_config_data:
APP_CONFIG_FILE: "/config/app_config.json"
LOG_LINES: "5"
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
- monitor_config_data:/config
restart: unless-stopped
command: python -m simple_monitor.monitor
volumes:
monitor_config_data:
Update the placeholders in the docker-compose.yml file:
your_actual_telegram_bot_token_here: Your Telegram Bot API Tokenyour_actual_chat_id_here: Your Telegram Chat IDyour_secret_key_here: A secure random string for the Flask applicationyour_secure_password_here: Your chosen admin passwordyour_docker_host_gid_here: The GID of the docker group on your hostRun the application:
docker-compose up -d
Access the Web UI:
Open your browser to http://<your_docker_host_ip>:5000
version: '3.8'
services:
webapp:
image: remotecellist/dockalert-telegram:latest
container_name: dockalert-telegram-webapp
user: "1000:1000" # Replace with your Docker host's docker UID
group_add:
- "123" # Replace with your Docker host's docker GID
environment:
TELEGRAM_BOT_TOKEN: "your_bot_token_here"
TELEGRAM_CHAT_ID: "your_chat_id_here"
FLASK_USER: "admin"
FLASK_PASSWORD: "your_password_here"
FLASK_SECRET: "your_secret_key_here"
FLASK_DEBUG: "0"
FLASK_RUN_PORT: "5000"
MONITORED_FILE: "/config/monitored.json"
APP_CONFIG_FILE: "/config/app_config.json"
LOG_LINES: "5"
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
- monitor_config_data:/config
ports:
- "5000:5000"
restart: unless-stopped
command: python -m simple_monitor.webapp
monitor:
image: remotecellist/dockalert-telegram:latest
container_name: dockalert-telegram-monitor
user: "1000:1000" # Replace with your Docker host's docker UID
group_add:
- "123" # Replace with your Docker host's docker GID
environment:
TELEGRAM_BOT_TOKEN: "your_bot_token_here"
TELEGRAM_CHAT_ID: "your_chat_id_here"
MONITORED_FILE: "/config/monitored.json"
APP_CONFIG_FILE: "/config/app_config.json"
LOG_LINES: "5"
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
- monitor_config_data:/config
restart: unless-stopped
command: python -m simple_monitor.monitor
volumes:
monitor_config_data:
http://<your_host_ip>:5000. Log in with the username and password you configured. View container statuses, select containers to monitor, view logs, and change settings on the "Config" page.group_add section.docker logs dockalert-telegram-webapp or through the Portainer interface.Content type
Image
Digest
sha256:6246a1343…
Size
45.7 MB
Last updated
over 1 year ago
docker pull remotecellist/dockalert-telegram