A collection of Python utility scripts for managing and maintaining various monitoring and infrastructure services.
- AlertManager - Prometheus AlertManager silence management
- Cloudflare - DNS and certificate management utilities
- Graylog - Log management system maintenance
- HertzBeat - Monitoring system management tools
- Home Assistant - Smart home platform integration utilities
- Uptime Kuma - Uptime monitoring service utilities
-
Install dependencies:
pip3 install -r requirements.txt
-
Configure environment variables:
# Copy example files and edit with your values cp alertmanager/.env.example alertmanager/.env cp cloudflare/.env.example cloudflare/.env cp graylog/.env.example graylog/.env cp hertzbeat/.env.example hertzbeat/.env cp homeassistant/.env.example homeassistant/.env cp uptime-kuma/.env.example uptime-kuma/.env
-
Run scripts:
# Examples python3 alertmanager/alertmanager-maintenance.py --mute --duration 4 python3 graylog/graylog-maintenance.py --mute python3 hertzbeat/hertzbeat-maintenance.py --list
Each service directory follows a consistent pattern:
service/
├── config.py # Environment variable configuration
├── service-script.py # Main functionality
├── .env # Your environment variables (gitignored)
└── .env.example # Template for required variables
All scripts use centralized configuration management with python-dotenv
for secure credential handling.
alertmanager-maintenance.py
- Create/remove maintenance silences
cf_clear_stale_acme.py
- Clean up stale ACME challenge records
graylog-maintenance.py
- Mute/unmute event definitions
hertzbeat-maintenance.py
- Manage alert silenceshertzbeat-management.py
- Monitor management utilities
uptime-kuma-maintenance.py
- Maintenance window management
# Mute alerts for 2 hours (default)
python3 alertmanager/alertmanager-maintenance.py --mute
# Mute alerts for 4 hours
python3 alertmanager/alertmanager-maintenance.py --mute --duration 4
# Remove all silences
python3 alertmanager/alertmanager-maintenance.py --unmute
# List HertzBeat silences
python3 hertzbeat/hertzbeat-maintenance.py --list
# Clean Cloudflare ACME records
python3 cloudflare/cf_clear_stale_acme.py
Use --help
with any script for detailed usage information.