How pip513/cove-watchdog works
Cove missed-backup watchdog is an hourly monitor for backups that stop running, including failures hidden by Cove’s aggregate status. Its main workflow fetches per-device source history, evaluates it against monitoring rules, plans alerts and recoveries using saved state, then delivers email; it also sends a scheduled weekly heartbeat report and failure notices. The graph reflects documented Azure scheduling and storage plus relationships visible in the supplied source index. Some implementation excerpts were partial, so uncertain internal call details are omitted.
Main entry points: deliver.py Delivery orchestration · dispatch.py Alert and cadence planning · runner.py Check orchestration · run_watchdog.py Watchdog runner
Components 18
Runtime orchestration
- Azure Function
function_app.py - Watchdog runner
run_watchdog.py - Environment settings
cove/env.py
Cove data and detection
- Check orchestration
cove/runner.py - Cove API
- API client
cove/client.py - Device and source fetch
cove/devices.py - Datasource catalogue
cove/datasources.py - Per-source detection
cove/detection.py
Alert decisions
- Alert and cadence planning
cove/dispatch.py - Failure classification
cove/health.py - Alert history store
cove/state.py
Reports and email
- Delivery orchestration
cove/deliver.py - Alert rendering
cove/messages.py - Weekly report
cove/report.py - SMTP delivery
cove/notify.py
Other components
- Hourly timer
- SMTP relay
Connections 24
- Hourly timer → Azure Function: triggers hourly
README.md - Azure Function → Watchdog runner: invokes
function_app.py - Watchdog runner → Check orchestration: runs check
run_watchdog.py - Check orchestration → Environment settings: reads settings
cove/runner.py - Check orchestration → API client: authenticates
cove/runner.py - API client → Cove API: queries
cove/client.py - Check orchestration → Device and source fetch: fetches fleet
cove/runner.py - Device and source fetch → API client: requests devices
cove/devices.py - Device and source fetch → Datasource catalogue: uses catalogue
cove/devices.py - Check orchestration → Per-source detection: evaluates sources
cove/runner.py - Per-source detection → Device and source fetch: evaluates devices
cove/detection.py - Watchdog runner → Alert and cadence planning: plans notices
run_watchdog.py - Alert and cadence planning → Per-source detection: uses check outcome
cove/dispatch.py - Alert and cadence planning → Failure classification: handles failures
cove/dispatch.py - Alert and cadence planning → Weekly report: checks schedule
cove/dispatch.py - Alert and cadence planning → Alert history store: reads and commits
cove/dispatch.py - Watchdog runner → Delivery orchestration: delivers plan
run_watchdog.py - Delivery orchestration → Alert and cadence planning: uses plan
cove/deliver.py - Delivery orchestration → Failure classification: renders failures
cove/deliver.py - Delivery orchestration → Alert rendering: renders alerts
cove/deliver.py - Delivery orchestration → Weekly report: renders report
cove/deliver.py - Delivery orchestration → SMTP delivery: sends messages
cove/deliver.py - SMTP delivery → SMTP relay: sends email
cove/notify.py - Azure Function → Alert history store: persists history
README.md