Since 0.0.69, pause automatic rule actions for one container while continuing to monitor it.
1. Understand the scope
Maintenance suspends this agent’s automatic rule actions. Collection, metrics, audit and manual actions continue. It does not suspend Docker restart policies, other agents, external notifications or the public demo’s five-minute recovery timer. Already running actions are not interrupted.
2. Set a finite duration
Use the same state file as your cron or serve process and the full container ID:
monit-docker maintenance --state-file /var/lib/monit-docker/state.json --container-id FULL_CONTAINER_ID --duration 900
monit-docker maintenance --state-file /var/lib/monit-docker/state.json --container-id FULL_CONTAINER_ID --duration 0
The first command pauses actions for 15 minutes; the second resumes early. Durations are whole seconds from 1 to 86400; 0 cancels. These commands are offline and do not resolve container names. A replacement container has a different ID and does not inherit maintenance.
3. Enable interface controls
Use matching decryptus/monit-docker:1.3.3 and decryptus/monit-docker-ui:1.3.3 images. Add --allow-maintenance to your existing serve --allow-actions command, preserving its origin, token, state and journal settings. The interface offers 15 minutes, one hour and early resume with confirmation. Protected containers keep these controls disabled. The public demo enables them only on its two fixtures.
4. Persistence, audit and resumption
The deadline survives agent restarts. The scheduler resumes rule evaluation when the deadline expires. Existing cooldowns and restart budgets still apply; maintenance does not consume them. Activation, completion, skipped actions and automatic expiry are journaled. Transitions conservatively reset sustained-condition observation streaks in the shared state file, including other containers; --trigger-after must accumulate fresh observations.
Maintenance upgrades local state to schema 4. Older agents reject it; preserve a backup and plan state migration before downgrading. Keep the host clock synchronized. Status and metrics show the deadline and maintenance state as observed at the last collection.

