monit-docker 0.0.76__tar.gz → 0.0.77__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {monit_docker-0.0.76/monit_docker.egg-info → monit_docker-0.0.77}/PKG-INFO +7 -2
- {monit_docker-0.0.76 → monit_docker-0.0.77}/README.md +6 -1
- monit_docker-0.0.77/RELEASE +1 -0
- monit_docker-0.0.77/VERSION +1 -0
- {monit_docker-0.0.76 → monit_docker-0.0.77}/docs/architecture.md +10 -6
- {monit_docker-0.0.76 → monit_docker-0.0.77}/docs/check-config.md +9 -2
- monit_docker-0.0.77/docs/config-cli-contract.md +328 -0
- {monit_docker-0.0.76 → monit_docker-0.0.77}/docs/index.rst +2 -0
- monit_docker-0.0.77/docs/roadmap.md +91 -0
- {monit_docker-0.0.76 → monit_docker-0.0.77}/docs/scenarios.md +6 -0
- {monit_docker-0.0.76 → monit_docker-0.0.77}/monit_docker/__init__.py +1 -1
- {monit_docker-0.0.76 → monit_docker-0.0.77}/monit_docker/adapters/scenarios.py +4 -1
- {monit_docker-0.0.76 → monit_docker-0.0.77/monit_docker.egg-info}/PKG-INFO +7 -2
- {monit_docker-0.0.76 → monit_docker-0.0.77}/monit_docker.egg-info/SOURCES.txt +3 -0
- {monit_docker-0.0.76 → monit_docker-0.0.77}/setup.yml +2 -2
- monit_docker-0.0.77/tests/test_cli_contract.py +104 -0
- {monit_docker-0.0.76 → monit_docker-0.0.77}/tests/test_scenarios.py +28 -0
- monit_docker-0.0.76/RELEASE +0 -1
- monit_docker-0.0.76/VERSION +0 -1
- {monit_docker-0.0.76 → monit_docker-0.0.77}/LICENSE +0 -0
- {monit_docker-0.0.76 → monit_docker-0.0.77}/MANIFEST.in +0 -0
- {monit_docker-0.0.76 → monit_docker-0.0.77}/bin/monit-docker +0 -0
- {monit_docker-0.0.76 → monit_docker-0.0.77}/docs/access-checks.md +0 -0
- {monit_docker-0.0.76 → monit_docker-0.0.77}/docs/alerts.md +0 -0
- {monit_docker-0.0.76 → monit_docker-0.0.77}/docs/audit.md +0 -0
- {monit_docker-0.0.76 → monit_docker-0.0.77}/docs/compose.md +0 -0
- {monit_docker-0.0.76 → monit_docker-0.0.77}/docs/cron.md +0 -0
- {monit_docker-0.0.76 → monit_docker-0.0.77}/docs/dockerhub.md +0 -0
- {monit_docker-0.0.76 → monit_docker-0.0.77}/docs/dwho-http-notifications.md +0 -0
- {monit_docker-0.0.76 → monit_docker-0.0.77}/docs/filesystems.md +0 -0
- {monit_docker-0.0.76 → monit_docker-0.0.77}/docs/grafana.md +0 -0
- {monit_docker-0.0.76 → monit_docker-0.0.77}/docs/healthchecks.md +0 -0
- {monit_docker-0.0.76 → monit_docker-0.0.77}/docs/images/grafana-cpu.png +0 -0
- {monit_docker-0.0.76 → monit_docker-0.0.77}/docs/images/grafana-network.png +0 -0
- {monit_docker-0.0.76 → monit_docker-0.0.77}/docs/images/grafana-overview.png +0 -0
- {monit_docker-0.0.76 → monit_docker-0.0.77}/docs/maintenance.md +0 -0
- {monit_docker-0.0.76 → monit_docker-0.0.77}/docs/metrics.md +0 -0
- {monit_docker-0.0.76 → monit_docker-0.0.77}/docs/notifications.md +0 -0
- {monit_docker-0.0.76 → monit_docker-0.0.77}/docs/pypi.md +0 -0
- {monit_docker-0.0.76 → monit_docker-0.0.77}/docs/redis-notifications.md +0 -0
- {monit_docker-0.0.76 → monit_docker-0.0.77}/docs/restart-limit.md +0 -0
- {monit_docker-0.0.76 → monit_docker-0.0.77}/docs/runtime-checks.md +0 -0
- {monit_docker-0.0.76 → monit_docker-0.0.77}/docs/serve.md +0 -0
- {monit_docker-0.0.76 → monit_docker-0.0.77}/docs/simple.md +0 -0
- {monit_docker-0.0.76 → monit_docker-0.0.77}/docs/trigger-delay.md +0 -0
- {monit_docker-0.0.76 → monit_docker-0.0.77}/docs/troubleshooting.md +0 -0
- {monit_docker-0.0.76 → monit_docker-0.0.77}/docs/ui.md +0 -0
- {monit_docker-0.0.76 → monit_docker-0.0.77}/examples/grafana/monit-docker.json +0 -0
- {monit_docker-0.0.76 → monit_docker-0.0.77}/examples/monitoring/alertmanager.email-slack.yml +0 -0
- {monit_docker-0.0.76 → monit_docker-0.0.77}/examples/monitoring/alertmanager.email.yml +0 -0
- {monit_docker-0.0.76 → monit_docker-0.0.77}/examples/monitoring/alertmanager.redis.yml +0 -0
- {monit_docker-0.0.76 → monit_docker-0.0.77}/examples/monitoring/alertmanager.slack.yml +0 -0
- {monit_docker-0.0.76 → monit_docker-0.0.77}/examples/monitoring/alerts.runtime.test.yml +0 -0
- {monit_docker-0.0.76 → monit_docker-0.0.77}/examples/monitoring/alerts.runtime.yml +0 -0
- {monit_docker-0.0.76 → monit_docker-0.0.77}/examples/monitoring/alerts.test.yml +0 -0
- {monit_docker-0.0.76 → monit_docker-0.0.77}/examples/monitoring/alerts.yml +0 -0
- {monit_docker-0.0.76 → monit_docker-0.0.77}/examples/monitoring/compose.audit.yaml +0 -0
- {monit_docker-0.0.76 → monit_docker-0.0.77}/examples/monitoring/compose.notifications.yaml +0 -0
- {monit_docker-0.0.76 → monit_docker-0.0.77}/examples/monitoring/compose.redis.yaml +0 -0
- {monit_docker-0.0.76 → monit_docker-0.0.77}/examples/monitoring/compose.yaml +0 -0
- {monit_docker-0.0.76 → monit_docker-0.0.77}/examples/monitoring/dwho-http/http.json +0 -0
- {monit_docker-0.0.76 → monit_docker-0.0.77}/examples/monitoring/dwho-http/http.yml +0 -0
- {monit_docker-0.0.76 → monit_docker-0.0.77}/examples/monitoring/dwho-http/payload.json +0 -0
- {monit_docker-0.0.76 → monit_docker-0.0.77}/examples/monitoring/dwho-http/send.py +0 -0
- {monit_docker-0.0.76 → monit_docker-0.0.77}/examples/monitoring/grafana/dashboards.yml +0 -0
- {monit_docker-0.0.76 → monit_docker-0.0.77}/examples/monitoring/grafana/datasources.yml +0 -0
- {monit_docker-0.0.76 → monit_docker-0.0.77}/examples/monitoring/prometheus-notifications.yml +0 -0
- {monit_docker-0.0.76 → monit_docker-0.0.77}/examples/monitoring/prometheus.yml +0 -0
- {monit_docker-0.0.76 → monit_docker-0.0.77}/examples/monitoring/redis-webhook/Dockerfile +0 -0
- {monit_docker-0.0.76 → monit_docker-0.0.77}/examples/monitoring/redis-webhook/bridge.py +0 -0
- {monit_docker-0.0.76 → monit_docker-0.0.77}/examples/monitoring/redis-webhook/requirements.txt +0 -0
- {monit_docker-0.0.76 → monit_docker-0.0.77}/examples/monitoring/start.sh +0 -0
- {monit_docker-0.0.76 → monit_docker-0.0.77}/examples/scenarios.yml +0 -0
- {monit_docker-0.0.76 → monit_docker-0.0.77}/examples/ui/compose.actions.yaml +0 -0
- {monit_docker-0.0.76 → monit_docker-0.0.77}/examples/ui/compose.journal.yaml +0 -0
- {monit_docker-0.0.76 → monit_docker-0.0.77}/examples/ui/compose.yaml +0 -0
- {monit_docker-0.0.76 → monit_docker-0.0.77}/examples/ui/prepare.py +0 -0
- {monit_docker-0.0.76 → monit_docker-0.0.77}/monit_docker/__main__.py +0 -0
- {monit_docker-0.0.76 → monit_docker-0.0.77}/monit_docker/adapters/__init__.py +0 -0
- {monit_docker-0.0.76 → monit_docker-0.0.77}/monit_docker/adapters/access.py +0 -0
- {monit_docker-0.0.76 → monit_docker-0.0.77}/monit_docker/adapters/configuration.py +0 -0
- {monit_docker-0.0.76 → monit_docker-0.0.77}/monit_docker/adapters/docker.py +0 -0
- {monit_docker-0.0.76 → monit_docker-0.0.77}/monit_docker/adapters/events.py +0 -0
- {monit_docker-0.0.76 → monit_docker-0.0.77}/monit_docker/adapters/filesystems.py +0 -0
- {monit_docker-0.0.76 → monit_docker-0.0.77}/monit_docker/adapters/http.py +0 -0
- {monit_docker-0.0.76 → monit_docker-0.0.77}/monit_docker/adapters/http_routes.py +0 -0
- {monit_docker-0.0.76 → monit_docker-0.0.77}/monit_docker/adapters/rules.py +0 -0
- {monit_docker-0.0.76 → monit_docker-0.0.77}/monit_docker/adapters/selection.py +0 -0
- {monit_docker-0.0.76 → monit_docker-0.0.77}/monit_docker/adapters/state.py +0 -0
- {monit_docker-0.0.76 → monit_docker-0.0.77}/monit_docker/adapters/syntax.py +0 -0
- {monit_docker-0.0.76 → monit_docker-0.0.77}/monit_docker/adapters/validation.py +0 -0
- {monit_docker-0.0.76 → monit_docker-0.0.77}/monit_docker/audit.py +0 -0
- {monit_docker-0.0.76 → monit_docker-0.0.77}/monit_docker/audit_forward.py +0 -0
- {monit_docker-0.0.76 → monit_docker-0.0.77}/monit_docker/audit_query.py +0 -0
- {monit_docker-0.0.76 → monit_docker-0.0.77}/monit_docker/cli.py +0 -0
- {monit_docker-0.0.76 → monit_docker-0.0.77}/monit_docker/core/__init__.py +0 -0
- {monit_docker-0.0.76 → monit_docker-0.0.77}/monit_docker/core/engine.py +0 -0
- {monit_docker-0.0.76 → monit_docker-0.0.77}/monit_docker/core/manual.py +0 -0
- {monit_docker-0.0.76 → monit_docker-0.0.77}/monit_docker/core/metrics.py +0 -0
- {monit_docker-0.0.76 → monit_docker-0.0.77}/monit_docker/core/policy.py +0 -0
- {monit_docker-0.0.76 → monit_docker-0.0.77}/monit_docker/core/rules.py +0 -0
- {monit_docker-0.0.76 → monit_docker-0.0.77}/monit_docker/domain/__init__.py +0 -0
- {monit_docker-0.0.76 → monit_docker-0.0.77}/monit_docker/domain/errors.py +0 -0
- {monit_docker-0.0.76 → monit_docker-0.0.77}/monit_docker/domain/filesystems.py +0 -0
- {monit_docker-0.0.76 → monit_docker-0.0.77}/monit_docker/domain/maintenance.py +0 -0
- {monit_docker-0.0.76 → monit_docker-0.0.77}/monit_docker/domain/models.py +0 -0
- {monit_docker-0.0.76 → monit_docker-0.0.77}/monit_docker/domain/rules.py +0 -0
- {monit_docker-0.0.76 → monit_docker-0.0.77}/monit_docker/domain/runtime.py +0 -0
- {monit_docker-0.0.76 → monit_docker-0.0.77}/monit_docker/manual_actions.py +0 -0
- {monit_docker-0.0.76 → monit_docker-0.0.77}/monit_docker/notification_audit.py +0 -0
- {monit_docker-0.0.76 → monit_docker-0.0.77}/monit_docker/outputs/__init__.py +0 -0
- {monit_docker-0.0.76 → monit_docker-0.0.77}/monit_docker/outputs/formatting.py +0 -0
- {monit_docker-0.0.76 → monit_docker-0.0.77}/monit_docker/outputs/prometheus.py +0 -0
- {monit_docker-0.0.76 → monit_docker-0.0.77}/monit_docker/service.py +0 -0
- {monit_docker-0.0.76 → monit_docker-0.0.77}/monit_docker.egg-info/dependency_links.txt +0 -0
- {monit_docker-0.0.76 → monit_docker-0.0.77}/monit_docker.egg-info/requires.txt +0 -0
- {monit_docker-0.0.76 → monit_docker-0.0.77}/monit_docker.egg-info/top_level.txt +0 -0
- {monit_docker-0.0.76 → monit_docker-0.0.77}/pyproject.toml +0 -0
- {monit_docker-0.0.76 → monit_docker-0.0.77}/requirements.txt +0 -0
- {monit_docker-0.0.76 → monit_docker-0.0.77}/setup.cfg +0 -0
- {monit_docker-0.0.76 → monit_docker-0.0.77}/setup.py +0 -0
- {monit_docker-0.0.76 → monit_docker-0.0.77}/tests/test_access.py +0 -0
- {monit_docker-0.0.76 → monit_docker-0.0.77}/tests/test_access_docker.py +0 -0
- {monit_docker-0.0.76 → monit_docker-0.0.77}/tests/test_adapters.py +0 -0
- {monit_docker-0.0.76 → monit_docker-0.0.77}/tests/test_audit.py +0 -0
- {monit_docker-0.0.76 → monit_docker-0.0.77}/tests/test_audit_query.py +0 -0
- {monit_docker-0.0.76 → monit_docker-0.0.77}/tests/test_check_config.py +0 -0
- {monit_docker-0.0.76 → monit_docker-0.0.77}/tests/test_core.py +0 -0
- {monit_docker-0.0.76 → monit_docker-0.0.77}/tests/test_cron.py +0 -0
- {monit_docker-0.0.76 → monit_docker-0.0.77}/tests/test_docker_integration.py +0 -0
- {monit_docker-0.0.76 → monit_docker-0.0.77}/tests/test_engine.py +0 -0
- {monit_docker-0.0.76 → monit_docker-0.0.77}/tests/test_filesystem_mode.py +0 -0
- {monit_docker-0.0.76 → monit_docker-0.0.77}/tests/test_filesystems.py +0 -0
- {monit_docker-0.0.76 → monit_docker-0.0.77}/tests/test_health.py +0 -0
- {monit_docker-0.0.76 → monit_docker-0.0.77}/tests/test_httpdis_transport.py +0 -0
- {monit_docker-0.0.76 → monit_docker-0.0.77}/tests/test_maintenance.py +0 -0
- {monit_docker-0.0.76 → monit_docker-0.0.77}/tests/test_manual_actions.py +0 -0
- {monit_docker-0.0.76 → monit_docker-0.0.77}/tests/test_monit_docker.py +0 -0
- {monit_docker-0.0.76 → monit_docker-0.0.77}/tests/test_packaging.py +0 -0
- {monit_docker-0.0.76 → monit_docker-0.0.77}/tests/test_restart_limit.py +0 -0
- {monit_docker-0.0.76 → monit_docker-0.0.77}/tests/test_runtime_checks.py +0 -0
- {monit_docker-0.0.76 → monit_docker-0.0.77}/tests/test_runtime_docker.py +0 -0
- {monit_docker-0.0.76 → monit_docker-0.0.77}/tests/test_service.py +0 -0
- {monit_docker-0.0.76 → monit_docker-0.0.77}/tests/test_trigger_delay.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: monit-docker
|
|
3
|
-
Version: 0.0.
|
|
3
|
+
Version: 0.0.77
|
|
4
4
|
Summary: monit-docker
|
|
5
5
|
Home-page: https://github.com/decryptus/monit-docker
|
|
6
6
|
Author: Adrien Delle Cave
|
|
@@ -57,7 +57,12 @@ Dynamic: summary
|
|
|
57
57
|
[Website](https://www.monit-docker.com/) ·
|
|
58
58
|
[Documentation (FR)](https://www.monit-docker.com/docs/fr/) ·
|
|
59
59
|
[Documentation (EN)](https://www.monit-docker.com/docs/en/) ·
|
|
60
|
-
[Live demo](https://demo.monit-docker.com/)
|
|
60
|
+
[Live demo](https://demo.monit-docker.com/) ·
|
|
61
|
+
[Roadmap to 1.0](docs/roadmap.md)
|
|
62
|
+
|
|
63
|
+
The [configuration and CLI compatibility baseline](docs/config-cli-contract.md)
|
|
64
|
+
records current option precedence, selectors, scenario fields and exit codes,
|
|
65
|
+
with the open decisions to resolve before 1.0.
|
|
61
66
|
|
|
62
67
|
For persistent action and notification history, available since **0.0.65**, see
|
|
63
68
|
the [audit journal guide](docs/audit.md). Since **0.0.66**, it also includes an optional
|
|
@@ -12,7 +12,12 @@
|
|
|
12
12
|
[Website](https://www.monit-docker.com/) ·
|
|
13
13
|
[Documentation (FR)](https://www.monit-docker.com/docs/fr/) ·
|
|
14
14
|
[Documentation (EN)](https://www.monit-docker.com/docs/en/) ·
|
|
15
|
-
[Live demo](https://demo.monit-docker.com/)
|
|
15
|
+
[Live demo](https://demo.monit-docker.com/) ·
|
|
16
|
+
[Roadmap to 1.0](docs/roadmap.md)
|
|
17
|
+
|
|
18
|
+
The [configuration and CLI compatibility baseline](docs/config-cli-contract.md)
|
|
19
|
+
records current option precedence, selectors, scenario fields and exit codes,
|
|
20
|
+
with the open decisions to resolve before 1.0.
|
|
16
21
|
|
|
17
22
|
For persistent action and notification history, available since **0.0.65**, see
|
|
18
23
|
the [audit journal guide](docs/audit.md). Since **0.0.66**, it also includes an optional
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
0.0.77
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
0.0.77
|
|
@@ -228,7 +228,9 @@ Still pending: a cycle-wide deadline and an embedded UI. A client timeout can be
|
|
|
228
228
|
client settings; it is not an overall cycle deadline. Configuration is fixed for
|
|
229
229
|
each constructed CLI command; automatic reload is not added.
|
|
230
230
|
Legacy Python versions advertised by the package are not exercised by the CI
|
|
231
|
-
matrix, which currently runs Python 3.10 and 3.12.
|
|
231
|
+
matrix, which currently runs Python 3.10 and 3.12. Some advertised interpreters
|
|
232
|
+
cannot run the current code; the supported minimum remains to be reconciled with
|
|
233
|
+
the metadata. See the [configuration and CLI compatibility baseline](config-cli-contract.md).
|
|
232
234
|
|
|
233
235
|
|
|
234
236
|
## Optional UI and manual operations
|
|
@@ -243,15 +245,17 @@ network directly. See [UI setup](ui.md).
|
|
|
243
245
|
HTTP adapter verifies a proxy secret, exact origin, method, content type and
|
|
244
246
|
body length before admission. `MonitorService` executes one pending operation
|
|
245
247
|
between cycles, using the same operation mutex as collection. The engine's
|
|
246
|
-
manual method reselects an exact container ID and checks
|
|
247
|
-
vocabulary
|
|
248
|
+
manual method reselects an exact container ID and checks the supported action
|
|
249
|
+
vocabulary, including optional maintenance and restart-budget rearm. CLI
|
|
250
|
+
composition supplies the state-backed reservation function;
|
|
248
251
|
core/domain code has no HTTP, authentication, UI or storage imports.
|
|
249
252
|
|
|
250
|
-
Manual cooldowns use a distinct per-container key across
|
|
251
|
-
do not replace rule cooldowns
|
|
253
|
+
Manual cooldowns use a distinct per-container key across the manual commands;
|
|
254
|
+
they do not replace rule cooldowns. The separate persistent audit journal records
|
|
255
|
+
action attribution and outcomes. An operation reserves
|
|
252
256
|
before execution and invalidates cached measurements. The subsequent collection
|
|
253
257
|
refreshes the cache. Autonomous rules remain enabled and can reverse a manual
|
|
254
|
-
operation
|
|
258
|
+
operation unless automatic actions are suspended by temporary maintenance. The
|
|
255
259
|
queue does not promise exactly-once execution across process restarts.
|
|
256
260
|
|
|
257
261
|
The component is Community-only single-host software. A future commercial
|
|
@@ -37,7 +37,8 @@ An empty mapping (`{}`) is valid; an empty file, `null` or a list is not.
|
|
|
37
37
|
## What gets checked
|
|
38
38
|
|
|
39
39
|
- Top-level sections and entry shapes: `general`, `vars`, `clients`, `ctn-groups`,
|
|
40
|
-
`conditions` and `
|
|
40
|
+
`dir-groups`, `conditions`, `commands` and `scenarios`; missing fields and unknown
|
|
41
|
+
sections/entry fields.
|
|
41
42
|
- Existing import directives, relative file paths and Mako rendering. The same
|
|
42
43
|
import scope and override behavior as the runtime is used.
|
|
43
44
|
- Client configuration mappings and basic TLS shape; explicit client names.
|
|
@@ -45,6 +46,9 @@ An empty mapping (`{}`) is valid; an empty file, `null` or a list is not.
|
|
|
45
46
|
- Every group match and regular expression, CLI selectors and selected group names.
|
|
46
47
|
- Every command/condition alias, supported Docker action, action argument shape,
|
|
47
48
|
rule syntax, resource name, unit conversion and condition value conversion.
|
|
49
|
+
- Every named scenario, including its mode-specific options, resources, rules
|
|
50
|
+
and references. Since 0.0.77, access resources also require an explicit directory
|
|
51
|
+
access identity during offline validation, before a runner can start.
|
|
48
52
|
|
|
49
53
|
Validation stops at the first error. Locations identify the source/import file,
|
|
50
54
|
entry or supplied rule; YAML syntax errors also include line and column numbers.
|
|
@@ -53,7 +57,10 @@ Fix the reported error and rerun to reveal any later errors.
|
|
|
53
57
|
|
|
54
58
|
Checks are deliberately stricter than the legacy loader, which can ignore some
|
|
55
59
|
unused sections or fields. The behavior and exit codes of the existing commands
|
|
56
|
-
are unchanged.
|
|
60
|
+
are unchanged, except for the scenario validation correction noted above.
|
|
61
|
+
|
|
62
|
+
See the [configuration and CLI contract](config-cli-contract.md) for precedence,
|
|
63
|
+
selection semantics and the remaining compatibility decisions before 1.0.
|
|
57
64
|
|
|
58
65
|
## Output and exit codes
|
|
59
66
|
|
|
@@ -0,0 +1,328 @@
|
|
|
1
|
+
# Configuration and CLI compatibility contract
|
|
2
|
+
|
|
3
|
+
**Status: 0.0.x baseline, reviewed for the proposed 0.0.77 release.** This reference
|
|
4
|
+
records the current public behavior and the decisions still needed before 1.0.
|
|
5
|
+
It does not declare the HTTP API, metrics or journal schema stable. Follow the
|
|
6
|
+
[roadmap](roadmap.md) for the complete release criteria.
|
|
7
|
+
|
|
8
|
+
Use full option names and explicit selectors in automation. Global options go
|
|
9
|
+
before the subcommand; that subcommand's options go after it:
|
|
10
|
+
|
|
11
|
+
```sh
|
|
12
|
+
monit-docker -c config.yml --name 'web-*' stats --rsc status
|
|
13
|
+
monit-docker -c config.yml check-config --output json
|
|
14
|
+
monit-docker -c config.yml run web-guard --dry-run
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
## Configuration source and precedence
|
|
18
|
+
|
|
19
|
+
1. `-c FILE` selects a file; otherwise use `MONIT_DOCKER_CONFFILE`, then
|
|
20
|
+
`/etc/monit-docker/monit-docker.yml`.
|
|
21
|
+
2. If the selected path exists, load it. A read or parse error does **not** fall
|
|
22
|
+
back to the environment.
|
|
23
|
+
3. If it does not exist, use nonempty `MONIT_DOCKER_CONFIG` as inline YAML.
|
|
24
|
+
4. Without either source, historical `stats`, `monit`, `cron` and `serve` use an
|
|
25
|
+
empty configuration. `check-config`, `run` and `scenario` instead return 110.
|
|
26
|
+
|
|
27
|
+
The root must be a YAML mapping. `{}` is valid; an empty document, `null` or a
|
|
28
|
+
list is not. The checked loader requires string keys and mapping-valued sections.
|
|
29
|
+
It rejects unknown sections and entry fields. The historical loader is more
|
|
30
|
+
permissive and can ignore unused fields; `stats` does not load command/condition
|
|
31
|
+
aliases. Validate with `check-config` before deployment.
|
|
32
|
+
|
|
33
|
+
| Section | Entry structure | Meaning |
|
|
34
|
+
| --- | --- | --- |
|
|
35
|
+
| `general` | Mapping | Template context, not a mapping of CLI defaults |
|
|
36
|
+
| `vars` | Mapping | Shared template variables |
|
|
37
|
+
| `clients` | `NAME: {config: MAPPING}` | Docker SDK connection options; `tls` may be a boolean or mapping |
|
|
38
|
+
| `ctn-groups` | `NAME: {match: [STRING, ...]}` | Nonempty list of `name:`, `id:`, `image:` or `label:` patterns |
|
|
39
|
+
| `dir-groups` | `NAME: {paths: [STRING, ...], access: MAPPING}` | Nonempty absolute container paths; `access` is optional unless an access probe is requested |
|
|
40
|
+
| `conditions` | `NAME: {expr: [STRING, ...]}` | Nonempty list of conditions combined with AND |
|
|
41
|
+
| `commands` | `NAME: {exec: [ACTION, ...]}` | Nonempty ordered action sequence |
|
|
42
|
+
| `scenarios` | `NAME: MAPPING` | A named `stats`, `cron` or `serve` job |
|
|
43
|
+
|
|
44
|
+
Command/condition aliases and directory-group names use an ASCII letter followed
|
|
45
|
+
by at most 64 letters, digits, underscores, dots or hyphens. Scenario names match
|
|
46
|
+
`[a-z0-9][a-z0-9-]{0,63}` and are selected exactly. Client and container-group names
|
|
47
|
+
have no equivalent restrictive naming pattern in the checked loader, but must
|
|
48
|
+
be nonempty strings. Prefer simple printable names.
|
|
49
|
+
|
|
50
|
+
Entries may have local `vars` and `@import_vars`. Section imports use
|
|
51
|
+
`@import_client`, `@import_ctn-group`, `@import_dir-group`, `@import_condition`,
|
|
52
|
+
`@import_command` or `@import_scenario`; accept one path or a nonempty list. Imported
|
|
53
|
+
files contain entries directly, without repeating the section wrapper. Relative
|
|
54
|
+
imports resolve against the main file's directory (the working directory for
|
|
55
|
+
inline configuration). Later imports override earlier entries; main-file entries
|
|
56
|
+
override imported entries **as a whole**, without deep merging. Imports are not
|
|
57
|
+
a recursive include mechanism.
|
|
58
|
+
|
|
59
|
+
Mako templates run during rendering and must be trusted. They can access `ENV`,
|
|
60
|
+
the `my` YAML helper and the supplied context. An imported file is rendered before
|
|
61
|
+
its entry-local variables are available. Offline validation does not sandbox
|
|
62
|
+
template execution. State/audit paths resolve against the working directory,
|
|
63
|
+
not the configuration directory; absolute paths are preferable for scheduled jobs.
|
|
64
|
+
|
|
65
|
+
Directory access identities contain exactly `uid`, `gid` and `groups`: integer
|
|
66
|
+
IDs from 0 through 4294967294, and 1..128 distinct supplementary group IDs including
|
|
67
|
+
`gid`. Booleans are not IDs. Paths cannot contain ASCII control characters;
|
|
68
|
+
duplicates are removed in order. Access probes require Python 3 in the target
|
|
69
|
+
Linux container; see [access checks](access-checks.md) for runtime restrictions.
|
|
70
|
+
|
|
71
|
+
## Docker client selection
|
|
72
|
+
|
|
73
|
+
`--client-from-env` takes precedence over `--client` and configured clients.
|
|
74
|
+
Otherwise, `--client NAME` selects an entry, or the first loaded client is used.
|
|
75
|
+
With no configured clients the historical runtime uses Docker environment
|
|
76
|
+
settings, defaulting `DOCKER_HOST` to `unix:///var/run/docker.sock` when absent.
|
|
77
|
+
An explicit but unknown client is rejected by checked configuration. See the
|
|
78
|
+
legacy discrepancy under [open decisions](#open-decisions-before-10).
|
|
79
|
+
|
|
80
|
+
## Container selectors
|
|
81
|
+
|
|
82
|
+
| Input | Current behavior |
|
|
83
|
+
| --- | --- |
|
|
84
|
+
| `--name`, `--id`, `--image`, `--label` | Repeatable; each value is also split at commas, with surrounding whitespace removed |
|
|
85
|
+
| Several patterns or kinds | OR: any name, ID, image tag or label value can select the container |
|
|
86
|
+
| `-s STATUS` | Repeatable status alternatives, applied in addition to the pattern selection |
|
|
87
|
+
| `--ctn-group NAME` | Repeatable exact group names; their patterns form a union and replace direct name/ID/image/label patterns |
|
|
88
|
+
| No patterns/groups | All containers allowed by the status filter, including stopped containers |
|
|
89
|
+
| Ordinary pattern | Case-sensitive shell-style glob, matching the whole value |
|
|
90
|
+
| `~EXPRESSION` | Case-sensitive Python regular expression matched from the start; add `$` for an end anchor or `.*` for a leading search |
|
|
91
|
+
| 12-character alphanumeric ID pattern | Automatically gets a trailing `*` for legacy short-ID matching |
|
|
92
|
+
| Label pattern | Matches label **values**, not keys or Docker's `key=value` filter syntax |
|
|
93
|
+
| Image pattern | Matches image tags, not image IDs/digests |
|
|
94
|
+
|
|
95
|
+
Quote patterns to prevent shell expansion. Direct selectors, including scenario
|
|
96
|
+
selectors, split commas even inside regular expressions. For a quantifier such
|
|
97
|
+
as `{1,3}`, use a container group: group `match` expressions do not split commas.
|
|
98
|
+
For example:
|
|
99
|
+
|
|
100
|
+
```yaml
|
|
101
|
+
ctn-groups:
|
|
102
|
+
workers:
|
|
103
|
+
match: ['name:~worker-[0-9]{1,3}$']
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
Use `--ctn-group workers`, or scenario `select: {group: workers}`. Group matches
|
|
107
|
+
do not support status expressions; use `-s` or scenario `select.status`.
|
|
108
|
+
An empty result is error 114, not a successful no-op. Container iteration order
|
|
109
|
+
comes from Docker and is not promised to be sorted.
|
|
110
|
+
|
|
111
|
+
## Global options
|
|
112
|
+
|
|
113
|
+
| Options | Default / constraints |
|
|
114
|
+
| --- | --- |
|
|
115
|
+
| `-c` | Configuration precedence above |
|
|
116
|
+
| `--client`, `--client-from-env` | Client precedence above |
|
|
117
|
+
| `--name`, `--id`, `--image`, `--label`, `--ctn-group`, `-s` | Selection above; status is one of `running`, `created`, `paused`, `restarting`, `removing`, `exited`, `dead` |
|
|
118
|
+
| `-l` | `info`; `critical`, `error`, `warning`, `info`, `debug` |
|
|
119
|
+
| `--logfile` | `MONIT_DOCKER_LOGFILE` or `/var/log/monit-docker/monit-docker.log` |
|
|
120
|
+
| `--runtimedir` | `MONIT_DOCKER_RUNTIMEDIR` or `/run/monit-docker` |
|
|
121
|
+
| `--event-window` | 300 seconds; integer 1..86400 |
|
|
122
|
+
| `--audit-file` | `MONIT_DOCKER_AUDIT_FILE`; otherwise `audit/events.jsonl` beside the state file, or `$XDG_STATE_HOME/monit-docker/audit/events.jsonl` (`~/.local/state` fallback) when a journal is needed |
|
|
123
|
+
| `--audit-max-bytes` | 5242880; integer at least 65536 |
|
|
124
|
+
| `--audit-files` | 5; integer 1..100 |
|
|
125
|
+
|
|
126
|
+
An empty audit path is invalid. Export/forwarding and authenticated journal reads
|
|
127
|
+
require an explicit audit path (the environment variable also counts).
|
|
128
|
+
Environment-derived configuration/log/runtime defaults are read when the CLI
|
|
129
|
+
module is imported; set them before launching the process.
|
|
130
|
+
|
|
131
|
+
## Rules and action aliases
|
|
132
|
+
|
|
133
|
+
`--cmd` and `--cmd-if` are aliases for the same repeatable option. A rule is an
|
|
134
|
+
unconditional action, `CONDITION ? ACTION`, or `@condition_alias ? @command_alias`;
|
|
135
|
+
inline and aliased sides can be mixed. A command alias expands to its ordered
|
|
136
|
+
action list; a condition alias expands to conditions combined with AND. Alias
|
|
137
|
+
entries do not recursively reference other aliases.
|
|
138
|
+
|
|
139
|
+
Docker actions are `start`, `stop`, `remove`, `reload`, `restart`, `kill`, `pause`,
|
|
140
|
+
`unpause`. Parenthesized text such as `(sh -c "echo ready")` is a Docker exec
|
|
141
|
+
command; use an explicit shell when shell syntax is needed. In a command alias,
|
|
142
|
+
an action can be a string or a single-key mapping whose options are `args` (list)
|
|
143
|
+
and `kwargs` (mapping), passed to the Docker SDK. Offline validation does not
|
|
144
|
+
guarantee that every SDK keyword is supported. Completed exec status is required;
|
|
145
|
+
detached or streaming execs cannot be reported as successful monitored actions.
|
|
146
|
+
|
|
147
|
+
Numeric comparisons use `==`, `!=`, `<`, `<=`, `>`, `>=`, nonnegative numeric
|
|
148
|
+
literals and, where supported, byte units such as `MiB`. State membership uses
|
|
149
|
+
`in (paused,running)` or `not in (paused,running)`, without spaces inside the list.
|
|
150
|
+
Resource-specific bounds/operators are described in the check guides. Conditions
|
|
151
|
+
for one directory group must be satisfied together by at least one path in that
|
|
152
|
+
group. Separate groups and ordinary conditions are combined with AND.
|
|
153
|
+
|
|
154
|
+
Rules requiring only status/PID/health run before metric-dependent rules, even
|
|
155
|
+
when their CLI order is interleaved. Within each phase, input order is preserved.
|
|
156
|
+
Metric rules only run when the container is running or paused. This two-phase
|
|
157
|
+
behavior and the historical chained comparisons need explicit consideration
|
|
158
|
+
when converting long commands into scenarios.
|
|
159
|
+
|
|
160
|
+
## Subcommands and outputs
|
|
161
|
+
|
|
162
|
+
| Command | Options / behavior |
|
|
163
|
+
| --- | --- |
|
|
164
|
+
| `stats` | Repeatable `--rsc`; `--output json` (default) or `text`; no remediation |
|
|
165
|
+
| `monit` | Repeatable `--rsc` **or** repeatable `--cmd`/`--cmd-if`; `--dry-run` and `--propagate-exit-code` require rules |
|
|
166
|
+
| `cron` | Repeatable `--cmd`/`--cmd-if` and `--state-file` required; policy options below; `--dry-run`, `--propagate-exit-code` |
|
|
167
|
+
| `serve` | Continuous collection; repeatable `--rsc` and optional `--cmd`/`--cmd-if`; state required with rules; policy/listener options below |
|
|
168
|
+
| `check-config` | `--output text` (default) or `json`; optional repeatable `--cmd`/`--cmd-if` checked without running them |
|
|
169
|
+
| `scenario list` | JSON array of `{name, mode, description}`, sorted by name; no positional scenario name |
|
|
170
|
+
| `scenario show NAME` | One rendered scenario object as JSON; can contain command arguments; not a fully expanded default-option dump |
|
|
171
|
+
| `run NAME` | Run one exact scenario; optional `--dry-run` can enable but never disable simulation |
|
|
172
|
+
| `maintenance` | `--state-file`, exact lowercase 64-hex `--container-id`, `--duration` required; 0 resumes, 1..86400 seconds pauses automatic actions; JSON `{container_id, maintenance_until}` |
|
|
173
|
+
| `restart-reset` | `--state-file` and exact lowercase 64-hex `--container-id` required; JSON `{container_id, status: "rearmed"}`; requires recorded attempts |
|
|
174
|
+
| `audit-export` | `--format jsonl` (default) or `csv`; optional `--category action\|notification` and `--since` with timezone |
|
|
175
|
+
| `audit-send` | Export filters plus required `--url` HTTPS receiver and optional `--token-file`; forwards JSON events and reports acknowledgements on stderr |
|
|
176
|
+
|
|
177
|
+
`stats --output json` emits one JSON object per container, not a single array.
|
|
178
|
+
Each maps the container name to requested resource values. Memory, disk and I/O
|
|
179
|
+
values are human-readable unit strings where applicable. Text uses
|
|
180
|
+
`NAME|RESOURCE:VALUE|...`. `monit` text keeps raw units. Unavailable displayed
|
|
181
|
+
values may be null. Do not parse diagnostic logs as command output.
|
|
182
|
+
|
|
183
|
+
With no `--rsc`, `stats` and `serve` request `mem_usage`, `mem_limit`, `mem_percent`,
|
|
184
|
+
`cpu_percent`, `io_read`, `io_write`, `net_tx`, `net_rx`, `status`, `pid`, `health`.
|
|
185
|
+
Additional resources are `oom_events`, `starts_recent`, `pids_current`,
|
|
186
|
+
`pids_limit`, `pids_percent`, and filesystem resources such as `disk_percent[data]`.
|
|
187
|
+
See [filesystem](filesystems.md), [access](access-checks.md) and
|
|
188
|
+
[runtime](runtime-checks.md) references for all resource meanings and prerequisites.
|
|
189
|
+
|
|
190
|
+
Rules emit JSON action decisions containing `container_id`, `rule`, `command`
|
|
191
|
+
and `status`. Current statuses include `executed`, `dry-run`, `cooldown`,
|
|
192
|
+
`pending`, `restart-limit`, `maintenance`. Nonmatching rules emit no decision.
|
|
193
|
+
Docker exec output is not passed through as a structured stdout result.
|
|
194
|
+
The first action failure aborts the remaining actions and containers.
|
|
195
|
+
|
|
196
|
+
`check-config --output json` returns `{valid, errors, summary}` on stdout.
|
|
197
|
+
Errors contain `location` and `message`; validation stops at the first error.
|
|
198
|
+
Summary counts `clients`, `groups`, `commands`, `conditions`, `rules`, plus
|
|
199
|
+
`scenarios` when present. It validates dormant aliases/groups/scenarios as well
|
|
200
|
+
as supplied rules. `scenario list` validates all scenarios; `show` and `run`
|
|
201
|
+
validate the selected scenario after checking configuration shapes. Their
|
|
202
|
+
configuration errors go to stderr and return 110.
|
|
203
|
+
|
|
204
|
+
These inspection commands do not connect to Docker or create agent state/log
|
|
205
|
+
files. `maintenance` and `restart-reset` also avoid Docker but mutate local state
|
|
206
|
+
and write audit events. A dry run collects live Docker data; cron/serve can create
|
|
207
|
+
a lock and audit simulated decisions while preserving durable policy state.
|
|
208
|
+
|
|
209
|
+
## Policy and listener options
|
|
210
|
+
|
|
211
|
+
| Option | Modes | Default / constraints |
|
|
212
|
+
| --- | --- | --- |
|
|
213
|
+
| `--state-file` | `cron`, `serve` | Nonempty path; required in cron, or serve with rules/manual actions |
|
|
214
|
+
| `--cooldown` | `cron`, `serve` | 300 seconds; finite and nonnegative |
|
|
215
|
+
| `--max-restarts` | `cron`, `serve` | 3; positive integer, attempts per container until rearm |
|
|
216
|
+
| `--trigger-after` | `cron`, `serve` | 0; finite and nonnegative; positive value requires rules and `--max-gap` |
|
|
217
|
+
| `--max-gap` | `cron`, `serve` | Finite positive seconds; only with positive trigger delay; must exceed interval in serve |
|
|
218
|
+
| `--bind`, `--port` | `serve` | IPv4 `127.0.0.1`, integer 9808 (1..65535) |
|
|
219
|
+
| `--interval` | `serve` | 30 seconds; finite and at least 0.1 |
|
|
220
|
+
| `--stale-after` | `serve` | `max(90, 3 * interval)`; finite and at least interval |
|
|
221
|
+
| `--dry-run` | `monit`, `cron`, `serve`, `run` | Off; requires rules; incompatible with manual HTTP actions |
|
|
222
|
+
| `--allow-actions` | `serve` | Off; requires state, action token and exact HTTPS origin |
|
|
223
|
+
| `--action-origin`, `--action-token-file` | `serve` | Require `--allow-actions`; origin `https://host[:port]` without credentials/path/query/fragment; token file contains 64 lowercase hex characters with optional final newline |
|
|
224
|
+
| `--action-cooldown` | `serve` | 30 seconds; finite and at least 1 |
|
|
225
|
+
| `--allow-maintenance`, `--trust-proxy-user` | `serve` | Off; require `--allow-actions` |
|
|
226
|
+
| `--audit-read-token-file` | `serve` | Off; requires explicit audit path and a distinct read secret |
|
|
227
|
+
| `--notification-token-file` | `serve` | Off; private notification ingestion secret |
|
|
228
|
+
|
|
229
|
+
Keep one persistent state path per Docker host/job. A busy state lock fails
|
|
230
|
+
immediately with 117. See [cron](cron.md), [trigger delay](trigger-delay.md),
|
|
231
|
+
[restart limits](restart-limit.md) and [serve](serve.md) for policy and token details.
|
|
232
|
+
|
|
233
|
+
## Scenario fields and overrides
|
|
234
|
+
|
|
235
|
+
Scenario mode defaults to `cron`. All modes allow `mode`, `description`,
|
|
236
|
+
`select` or `all: true`, `client`, `client-from-env`, `event-window`, `audit-file`,
|
|
237
|
+
`audit-max-bytes`, `audit-files`. Selection fields are `name`, `id`, `image`,
|
|
238
|
+
`label`, `group`, `status`, each a string or nonempty string list. Choose `select`
|
|
239
|
+
or `all: true`, exclusively. Group selection allows only an additional status.
|
|
240
|
+
|
|
241
|
+
| Mode | Additional fields |
|
|
242
|
+
| --- | --- |
|
|
243
|
+
| `stats` | `resources`, `output` |
|
|
244
|
+
| `cron` | `rules`, `state-file`, `cooldown`, `max-restarts`, `trigger-after`, `max-gap`, `dry-run` |
|
|
245
|
+
| `serve` | All cron fields plus `resources`, `bind`, `port`, `interval`, `stale-after` |
|
|
246
|
+
|
|
247
|
+
`resources` and `rules` accept a string or nonempty string list. Booleans must be
|
|
248
|
+
YAML booleans, not strings. Integer fields accept integers or integer strings;
|
|
249
|
+
other numeric fields accept finite numbers or numeric strings, including template
|
|
250
|
+
results, then apply CLI bounds. Unknown or wrong-mode fields are rejected.
|
|
251
|
+
|
|
252
|
+
`run`/`scenario` reject global selectors and Docker-client overrides. Configuration,
|
|
253
|
+
log and runtime paths are inherited; global audit/event-window settings apply
|
|
254
|
+
unless the scenario defines them. CLI `run --dry-run` only enables simulation.
|
|
255
|
+
The configuration is rendered once and passed to the runner. Scenario names do
|
|
256
|
+
not identify cooldowns: changing the state path starts separate policy history.
|
|
257
|
+
Manual HTTP action options and exec-exit propagation are not scenario fields.
|
|
258
|
+
|
|
259
|
+
Since 0.0.77, access resources in stats/serve scenarios require the directory
|
|
260
|
+
group's `access` identity during offline validation, just as access rules and
|
|
261
|
+
execution do. Disk/inode/mount-mode resources do not require it.
|
|
262
|
+
|
|
263
|
+
## Exit codes
|
|
264
|
+
|
|
265
|
+
| Code | Meaning |
|
|
266
|
+
| --- | --- |
|
|
267
|
+
| 0 | Successful command; can mean no rule matched or all actions were skipped |
|
|
268
|
+
| 2 | Argument parsing/validation error, before command execution |
|
|
269
|
+
| 110 | Configuration, alias, scenario or value error handled as such |
|
|
270
|
+
| 114 | No container selected |
|
|
271
|
+
| 115 | Required observation unavailable |
|
|
272
|
+
| 116 | Action failure; default for failed in-container exec |
|
|
273
|
+
| 117 | Persistent state lock busy |
|
|
274
|
+
| 118 | State read/write/validation failure |
|
|
275
|
+
| 119 | Audit error, or handled OS/value errors in local administration commands |
|
|
276
|
+
| 140 | Rule syntax error reaching the historical runtime CLI |
|
|
277
|
+
| 150 | Unexpected exception reaching the historical runtime CLI |
|
|
278
|
+
| 170 | Docker SDK connection/client error |
|
|
279
|
+
| 180 | Docker API error during collection; action API failures normally become 116 |
|
|
280
|
+
| 255 | Interrupt/SystemExit handled inside the runtime CLI; not a promise for every signal or every entry point |
|
|
281
|
+
|
|
282
|
+
Some `monit --rsc` invocations intentionally return data as the process status:
|
|
283
|
+
|
|
284
|
+
- `status`: running 0, created 10, paused 20, restarting 30, removing 40, exited 50,
|
|
285
|
+
dead 60.
|
|
286
|
+
- `health`: healthy 0, starting 10, unhealthy 20, none 30, unknown 115.
|
|
287
|
+
- One ordinary `*_percent` resource: integer truncated and bounded to 0..100.
|
|
288
|
+
Raw `stats`/rule measurements are not capped. Filesystem percentages return
|
|
289
|
+
per-path output instead.
|
|
290
|
+
|
|
291
|
+
These early exits describe the **first selected container**, not an aggregate.
|
|
292
|
+
Use an exact container selector for a process-status check. `--propagate-exit-code`
|
|
293
|
+
in `monit`/`cron` returns a failed completed exec's 1..255 status instead of 116;
|
|
294
|
+
it can overlap every other status family. Check command mode and diagnostics.
|
|
295
|
+
|
|
296
|
+
## Open decisions before 1.0
|
|
297
|
+
|
|
298
|
+
- Unify or explicitly retain strict validation versus permissive runtime loading.
|
|
299
|
+
Normalize configuration failures that currently reach generic status 150.
|
|
300
|
+
- Decide whether an explicitly unknown client must fail even with no configured
|
|
301
|
+
clients; the historical runtime currently falls back to the environment.
|
|
302
|
+
- Decide whether mixed group/direct selection should be rejected in all commands,
|
|
303
|
+
as it already is in scenarios, rather than silently prioritizing groups.
|
|
304
|
+
- Decide how to support commas in direct regular-expression selectors without
|
|
305
|
+
breaking existing comma-separated selection.
|
|
306
|
+
- Review the [historical chained-comparison operand order](architecture.md#compatibility-and-validation):
|
|
307
|
+
`10 < cpu_percent < 90` currently compares the measurement against both bounds
|
|
308
|
+
using `<`. Prefer an AND condition alias with `cpu_percent > 10` and
|
|
309
|
+
`cpu_percent < 90`; do not reinterpret existing expressions without migration.
|
|
310
|
+
- Resolve Python support metadata: CI currently covers Python 3.10/3.12, while
|
|
311
|
+
package metadata still advertises older interpreters that this code cannot run on.
|
|
312
|
+
- Define the supported Docker/platform matrix, deprecation process and migration
|
|
313
|
+
policy; separately review HTTP fields, metrics and journal schema compatibility.
|
|
314
|
+
|
|
315
|
+
No internal Python class, diagnostic wording, implicit argparse abbreviation,
|
|
316
|
+
Docker enumeration order or undocumented YAML behavior is declared a stable API
|
|
317
|
+
by this baseline. Existing DWho, HTTPdis and Sonicprobe foundations remain in use.
|
|
318
|
+
|
|
319
|
+
## Verification
|
|
320
|
+
|
|
321
|
+
`test_cli_contract.py` covers target selection, label values/image tags, regular
|
|
322
|
+
expression boundaries, group precedence, import replacement, client precedence
|
|
323
|
+
and option placement. `test_scenarios.py` covers scenario overrides, offline
|
|
324
|
+
inspection, single rendering, state continuity and access-resource validation.
|
|
325
|
+
Existing `test_check_config.py`, `test_monit_docker.py`, `test_cron.py`,
|
|
326
|
+
`test_trigger_delay.py` and `test_restart_limit.py` cover diagnostics, exit-code
|
|
327
|
+
propagation and persistent policies. These tests support this inventory; they
|
|
328
|
+
do not complete every milestone in the 1.0 roadmap.
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
# Roadmap to 1.0
|
|
2
|
+
|
|
3
|
+
monit-docker remains in the **0.0.x** series while its public interfaces settle.
|
|
4
|
+
Version 1.0 is a compatibility commitment, not a feature-count target or a promise
|
|
5
|
+
of bug-free software. No release date is committed. This roadmap is maintained on
|
|
6
|
+
the default branch; its open milestones are planned work, not completed checks.
|
|
7
|
+
|
|
8
|
+
## Available in the 0.0.x series
|
|
9
|
+
|
|
10
|
+
- One-shot commands and continuous monitoring, sharing selectors and rules.
|
|
11
|
+
- Named YAML scenarios, configuration validation and dry runs.
|
|
12
|
+
- Resource, health, filesystem and access checks, including Linux ACLs.
|
|
13
|
+
- Action timing, restart limits, protected containers and temporary maintenance.
|
|
14
|
+
- Optional mobile-friendly UI, manual actions and correlated action history.
|
|
15
|
+
- Persistent audit journal, bounded reads and CSV/JSONL exports.
|
|
16
|
+
- Prometheus/Grafana integration and notification examples.
|
|
17
|
+
- Automated regression tests, Docker Hub/PyPI releases and a live Docker demo.
|
|
18
|
+
|
|
19
|
+
The 0.0.76 release adds immediate action-history previews and faster audit text
|
|
20
|
+
validation. Local function benchmarks are not measurements of whole-page latency.
|
|
21
|
+
|
|
22
|
+
## Before 1.0
|
|
23
|
+
|
|
24
|
+
### 1. Define the compatibility contract — in progress
|
|
25
|
+
|
|
26
|
+
- [x] Inventory current YAML configuration, scenario and selector syntax.
|
|
27
|
+
- [x] Inventory CLI behavior and exit codes with regression coverage.
|
|
28
|
+
- [ ] Resolve the open compatibility decisions and approve the 1.0 contract.
|
|
29
|
+
- [ ] Document HTTP API fields and metric names as compatibility contracts.
|
|
30
|
+
- [ ] Define journal schema evolution and compatibility with retained events.
|
|
31
|
+
- [ ] State supported Python/Docker environments and optional check prerequisites.
|
|
32
|
+
- [ ] Publish deprecation and migration rules for future incompatible changes.
|
|
33
|
+
|
|
34
|
+
Completion: each supported public interface has a documented contract and
|
|
35
|
+
regression coverage for its important behavior.
|
|
36
|
+
|
|
37
|
+
The [configuration and CLI baseline](config-cli-contract.md) records the first
|
|
38
|
+
review, including the corrected offline access-resource validation and remaining
|
|
39
|
+
legacy decisions. This inventory does not yet freeze a 1.0 interface.
|
|
40
|
+
|
|
41
|
+
### 2. Validate installation and upgrades — planned
|
|
42
|
+
|
|
43
|
+
- [ ] Rehearse fresh installations from both PyPI and the published Docker images.
|
|
44
|
+
- [ ] Exercise upgrades from documented supported 0.0.x versions while preserving
|
|
45
|
+
configuration, retained journal entries and relevant persistent action state.
|
|
46
|
+
- [ ] Document backup and rollback steps, including any schema restrictions.
|
|
47
|
+
- [ ] Verify cron and serve modes with and without the optional UI.
|
|
48
|
+
|
|
49
|
+
Completion: reproducible installation/upgrade procedures and their results are
|
|
50
|
+
recorded, including the versions actually tested.
|
|
51
|
+
|
|
52
|
+
### 3. Establish performance and resilience baselines — planned
|
|
53
|
+
|
|
54
|
+
- [ ] Benchmark ordinary and large retained journals, filters, action history,
|
|
55
|
+
rotation and exports with explicit datasets and hardware details.
|
|
56
|
+
- [ ] Measure CPU, memory, disk I/O and end-to-end latency; distinguish server
|
|
57
|
+
processing from network and browser time.
|
|
58
|
+
- [ ] Exercise Docker unavailability, concurrent actions, process restarts and
|
|
59
|
+
storage failures; document observed limits and recovery behavior.
|
|
60
|
+
- [ ] Define acceptable resource and latency bounds for reference workloads.
|
|
61
|
+
|
|
62
|
+
Completion: reproducible measurements meet the documented bounds, and failures
|
|
63
|
+
remain explicit without unbounded resource consumption or misleading outcomes.
|
|
64
|
+
|
|
65
|
+
### 4. Complete a stabilization period — planned
|
|
66
|
+
|
|
67
|
+
- [ ] Use a fixed candidate in real deployments for a documented observation period.
|
|
68
|
+
- [ ] Triage reported issues and resolve every release-blocking regression.
|
|
69
|
+
- [ ] Review permissions, protected containers, maintenance and action attribution.
|
|
70
|
+
- [ ] Recheck desktop/mobile behavior and publish release notes and known limits.
|
|
71
|
+
|
|
72
|
+
Completion: all earlier milestones have evidence, no release-blocking issue
|
|
73
|
+
remains, and the maintainer explicitly approves the 1.0 compatibility commitment.
|
|
74
|
+
Until then, releases stay in the 0.0.x series.
|
|
75
|
+
|
|
76
|
+
## Later candidates, not 1.0 commitments
|
|
77
|
+
|
|
78
|
+
- Additional checks and reusable scenario examples driven by real use cases.
|
|
79
|
+
- Journal indexing or an alternative storage backend only if measured workloads
|
|
80
|
+
justify the added complexity.
|
|
81
|
+
- Broader action-history navigation and export options based on user feedback.
|
|
82
|
+
|
|
83
|
+
## Design constraints
|
|
84
|
+
|
|
85
|
+
Keep the DWho, HTTPdis and Sonicprobe foundations, global constants and a light
|
|
86
|
+
mobile interface. Keep the simple mode useful without a monitoring stack. Code,
|
|
87
|
+
UI labels and machine-readable reasons remain in English. Prefer measured
|
|
88
|
+
improvements and documented behavior over adding infrastructure by default.
|
|
89
|
+
|
|
90
|
+
Discuss priorities through [GitHub issues](https://github.com/decryptus/monit-docker/issues).
|
|
91
|
+
The maintainer may revise the order and scope as evidence and user needs change.
|
|
@@ -104,6 +104,12 @@ Names match `[a-z0-9][a-z0-9-]{0,63}` and are selected by exact name. Existing
|
|
|
104
104
|
condition/action aliases and directory resources work in scenario rules/resources.
|
|
105
105
|
Permission probes still require Python 3 in the container and an explicit access
|
|
106
106
|
identity in the directory group.
|
|
107
|
+
Since 0.0.77, this identity is also required during offline validation of
|
|
108
|
+
`resources` in stats/serve scenarios; it was previously checked only when those
|
|
109
|
+
resources were collected. Disk, inode and mount-mode resources need no identity.
|
|
110
|
+
|
|
111
|
+
The [configuration and CLI contract](config-cli-contract.md) lists exact defaults,
|
|
112
|
+
option precedence, selector semantics and exit codes, including legacy limits.
|
|
107
113
|
|
|
108
114
|
Scenarios support existing Mako variables and section imports:
|
|
109
115
|
|
|
@@ -9,7 +9,7 @@ import sys
|
|
|
9
9
|
from monit_docker.adapters.rules import RuleParser
|
|
10
10
|
from monit_docker.adapters.selection import ContainerSelector
|
|
11
11
|
from monit_docker.adapters.filesystems import directory_groups
|
|
12
|
-
from monit_docker.domain.filesystems import filesystem_resource
|
|
12
|
+
from monit_docker.domain.filesystems import filesystem_resource, FILESYSTEM_ACCESS_FIELDS
|
|
13
13
|
|
|
14
14
|
SCENARIO_NAME = re.compile(r'^[a-z0-9][a-z0-9-]{0,63}$')
|
|
15
15
|
_SELECT_OPTIONS = {
|
|
@@ -146,6 +146,9 @@ def validate_scenario(config, name):
|
|
|
146
146
|
for resource in options.resource:
|
|
147
147
|
filesystem = filesystem_resource(resource)
|
|
148
148
|
require(not filesystem or filesystem[1] in groups, location + '.resources', 'unknown directory group')
|
|
149
|
+
if filesystem and filesystem[0] in FILESYSTEM_ACCESS_FIELDS:
|
|
150
|
+
require(groups[filesystem[1]].get('access') is not None, location + '.resources',
|
|
151
|
+
'access identity is required for filesystem access resources')
|
|
149
152
|
parser = checked(location + '.rules', lambda: RuleParser(config.get('commands'), config.get('conditions'), groups))
|
|
150
153
|
for index, expression in enumerate(getattr(options, 'cmd', ())):
|
|
151
154
|
_validate_rule(parser, expression, '%s.rules[%s]' % (location, index))
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: monit-docker
|
|
3
|
-
Version: 0.0.
|
|
3
|
+
Version: 0.0.77
|
|
4
4
|
Summary: monit-docker
|
|
5
5
|
Home-page: https://github.com/decryptus/monit-docker
|
|
6
6
|
Author: Adrien Delle Cave
|
|
@@ -57,7 +57,12 @@ Dynamic: summary
|
|
|
57
57
|
[Website](https://www.monit-docker.com/) ·
|
|
58
58
|
[Documentation (FR)](https://www.monit-docker.com/docs/fr/) ·
|
|
59
59
|
[Documentation (EN)](https://www.monit-docker.com/docs/en/) ·
|
|
60
|
-
[Live demo](https://demo.monit-docker.com/)
|
|
60
|
+
[Live demo](https://demo.monit-docker.com/) ·
|
|
61
|
+
[Roadmap to 1.0](docs/roadmap.md)
|
|
62
|
+
|
|
63
|
+
The [configuration and CLI compatibility baseline](docs/config-cli-contract.md)
|
|
64
|
+
records current option precedence, selectors, scenario fields and exit codes,
|
|
65
|
+
with the open decisions to resolve before 1.0.
|
|
61
66
|
|
|
62
67
|
For persistent action and notification history, available since **0.0.65**, see
|
|
63
68
|
the [audit journal guide](docs/audit.md). Since **0.0.66**, it also includes an optional
|
|
@@ -15,6 +15,7 @@ docs/architecture.md
|
|
|
15
15
|
docs/audit.md
|
|
16
16
|
docs/check-config.md
|
|
17
17
|
docs/compose.md
|
|
18
|
+
docs/config-cli-contract.md
|
|
18
19
|
docs/cron.md
|
|
19
20
|
docs/dockerhub.md
|
|
20
21
|
docs/dwho-http-notifications.md
|
|
@@ -28,6 +29,7 @@ docs/notifications.md
|
|
|
28
29
|
docs/pypi.md
|
|
29
30
|
docs/redis-notifications.md
|
|
30
31
|
docs/restart-limit.md
|
|
32
|
+
docs/roadmap.md
|
|
31
33
|
docs/runtime-checks.md
|
|
32
34
|
docs/scenarios.md
|
|
33
35
|
docs/serve.md
|
|
@@ -118,6 +120,7 @@ tests/test_adapters.py
|
|
|
118
120
|
tests/test_audit.py
|
|
119
121
|
tests/test_audit_query.py
|
|
120
122
|
tests/test_check_config.py
|
|
123
|
+
tests/test_cli_contract.py
|
|
121
124
|
tests/test_core.py
|
|
122
125
|
tests/test_cron.py
|
|
123
126
|
tests/test_docker_integration.py
|
|
@@ -4,8 +4,8 @@ description: monit-docker
|
|
|
4
4
|
author: Adrien Delle Cave
|
|
5
5
|
author_email: pypi@doowan.net
|
|
6
6
|
copyright: '2019-2023 Adrien Delle Cave'
|
|
7
|
-
release: '0.0.
|
|
8
|
-
version: '0.0.
|
|
7
|
+
release: '0.0.77'
|
|
8
|
+
version: '0.0.77'
|
|
9
9
|
license: License GPL-3
|
|
10
10
|
url: https://github.com/decryptus/monit-docker
|
|
11
11
|
python_requires:
|