mirror of
https://github.com/wickedyoda/public-setupfiles.git
synced 2026-11-16 13:31:56 -06:00
- Fix CRLF line endings (SC1017) in 10 shell scripts - Add shebangs (SC2148) to 5 scripts missing them - Fix unquoted variables (SC2086) in kali-updates.sh - Add shellcheck disable directive for intentional eval usage - Fix missing space after ! in observium/custom_install.sh - Add security scan reports to .gitignore-safe location
Uptime Updates
Uptime Kuma container monitoring synchronization bot.
Overview
The uptime-updates bot keeps Docker container IDs synchronized with Uptime Kuma monitors when containers are recreated.
Files
| File | Description |
|---|---|
uptime-bot.py |
Main Python bot |
config.yml |
Uptime Kuma API configuration |
container-monitor-map.yaml |
Container-to-monitor mappings |
requirements.txt |
Python dependencies |
setup-update_uptime-bot.sh |
Installation script |
export-watchtower-bundle.sh |
Create Docker bundle |
Installation
Using Setup Script
sudo bash uptime-updates/setup-update_uptime-bot.sh
Options
sudo bash setup-update_uptime-bot.sh \
--install-dir /opt/uptime-updates \
--service-name uptime-updates-bot.service \
--user root
Configuration
config.yml
uptime_kuma:
url: "http://127.0.0.1:3001"
api_key: "YOUR_API_KEY_HERE"
bot:
dry_run: false
request_timeout_seconds: 10
poll_interval_seconds: 60
container-monitor-map.yaml
mappings:
- name: "media-server jellyfin"
enabled: true
host_api: "tcp://10.0.84.21:2375"
container_name: "jellyfin"
uptime_monitor_id: 21
expected_uptime_type: "docker"
Docker Standalone Deployment
See uptime-updates/watchtower-export/ for Docker Compose files:
docker-compose.watchtower-uptime-sync.ymldocker-compose.watchtower-embedded.yml
Usage with Docker Remote API
Enable Docker TCP API
# On each Docker host
sudo bash /path/to/public-setupfiles/docker_stuff/setup-docker-remote-api.sh --allow-ip 10.0.84.50
Update Monitor Mapping
Edit container-monitor-map.yaml and re-run:
sudo bash setup-update_uptime-bot.sh
The bot reloads configuration each cycle, so most changes apply without restart.
Watchtower Export
Files
| File | Purpose |
|---|---|
Dockerfile |
Bot container image |
requirements.txt |
Python deps |
docker-compose.watchtower-uptime-sync.yml |
Separate containers |
docker-compose.watchtower-embedded.yml |
Embedded mode |
Build Bundle
cd uptime-updates
sudo bash export-watchtower-bundle.sh
Creates timestamped tar.gz for sharing.
Monitoring
# Check service status
systemctl status uptime-updates-bot
# View logs
journalctl -u uptime-updates-bot -f