monit-docker 1.1.4__tar.gz → 1.3.0__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.
Files changed (216) hide show
  1. {monit_docker-1.1.4/monit_docker.egg-info → monit_docker-1.3.0}/PKG-INFO +6 -6
  2. {monit_docker-1.1.4 → monit_docker-1.3.0}/README.md +4 -4
  3. monit_docker-1.3.0/RELEASE +1 -0
  4. monit_docker-1.3.0/VERSION +1 -0
  5. {monit_docker-1.1.4 → monit_docker-1.3.0}/docs/audit.md +8 -3
  6. {monit_docker-1.1.4 → monit_docker-1.3.0}/docs/compose-quickstart-fr.md +83 -2
  7. {monit_docker-1.1.4 → monit_docker-1.3.0}/docs/compose-quickstart.md +33 -2
  8. {monit_docker-1.1.4 → monit_docker-1.3.0}/docs/compose.md +19 -1
  9. {monit_docker-1.1.4 → monit_docker-1.3.0}/docs/config-cli-contract.md +19 -2
  10. {monit_docker-1.1.4 → monit_docker-1.3.0}/docs/cron.md +29 -1
  11. {monit_docker-1.1.4 → monit_docker-1.3.0}/docs/http-api-contract.md +15 -5
  12. {monit_docker-1.1.4 → monit_docker-1.3.0}/docs/index.rst +2 -0
  13. monit_docker-1.3.0/docs/release-1.2.0.md +14 -0
  14. monit_docker-1.3.0/docs/release-1.3.0.md +26 -0
  15. {monit_docker-1.1.4 → monit_docker-1.3.0}/docs/roadmap.md +8 -0
  16. {monit_docker-1.1.4 → monit_docker-1.3.0}/docs/serve.md +59 -1
  17. {monit_docker-1.1.4 → monit_docker-1.3.0}/docs/simple.md +18 -0
  18. {monit_docker-1.1.4 → monit_docker-1.3.0}/examples/monitoring/compose.yaml +1 -1
  19. monit_docker-1.3.0/examples/socket-proxy/Dockerfile +10 -0
  20. {monit_docker-1.1.4 → monit_docker-1.3.0}/examples/ui/compose.journal.yaml +2 -2
  21. {monit_docker-1.1.4 → monit_docker-1.3.0}/examples/ui/compose.yaml +2 -2
  22. {monit_docker-1.1.4 → monit_docker-1.3.0}/monit_docker/__init__.py +1 -1
  23. monit_docker-1.3.0/monit_docker/adapters/command_config.py +56 -0
  24. {monit_docker-1.1.4 → monit_docker-1.3.0}/monit_docker/adapters/configuration.py +2 -1
  25. {monit_docker-1.1.4 → monit_docker-1.3.0}/monit_docker/adapters/docker.py +48 -8
  26. {monit_docker-1.1.4 → monit_docker-1.3.0}/monit_docker/adapters/filesystems.py +8 -1
  27. {monit_docker-1.1.4 → monit_docker-1.3.0}/monit_docker/adapters/http.py +20 -12
  28. {monit_docker-1.1.4 → monit_docker-1.3.0}/monit_docker/adapters/http_routes.py +2 -2
  29. {monit_docker-1.1.4 → monit_docker-1.3.0}/monit_docker/adapters/http_security.py +13 -2
  30. {monit_docker-1.1.4 → monit_docker-1.3.0}/monit_docker/adapters/rules.py +4 -0
  31. {monit_docker-1.1.4 → monit_docker-1.3.0}/monit_docker/adapters/validation.py +15 -3
  32. {monit_docker-1.1.4 → monit_docker-1.3.0}/monit_docker/audit_query.py +1 -1
  33. {monit_docker-1.1.4 → monit_docker-1.3.0}/monit_docker/cli.py +61 -12
  34. {monit_docker-1.1.4 → monit_docker-1.3.0}/monit_docker/core/engine.py +3 -2
  35. {monit_docker-1.1.4 → monit_docker-1.3.0}/monit_docker/domain/errors.py +7 -0
  36. {monit_docker-1.1.4 → monit_docker-1.3.0/monit_docker.egg-info}/PKG-INFO +6 -6
  37. {monit_docker-1.1.4 → monit_docker-1.3.0}/monit_docker.egg-info/SOURCES.txt +7 -0
  38. {monit_docker-1.1.4 → monit_docker-1.3.0}/monit_docker.egg-info/requires.txt +1 -1
  39. {monit_docker-1.1.4 → monit_docker-1.3.0}/requirements.txt +1 -1
  40. {monit_docker-1.1.4 → monit_docker-1.3.0}/setup.yml +2 -2
  41. {monit_docker-1.1.4 → monit_docker-1.3.0}/tests/test_api_contract.py +73 -1
  42. {monit_docker-1.1.4 → monit_docker-1.3.0}/tests/test_audit.py +29 -1
  43. {monit_docker-1.1.4 → monit_docker-1.3.0}/tests/test_audit_query.py +21 -0
  44. {monit_docker-1.1.4 → monit_docker-1.3.0}/tests/test_cli_contract.py +11 -2
  45. monit_docker-1.3.0/tests/test_direct_command_config.py +58 -0
  46. {monit_docker-1.1.4 → monit_docker-1.3.0}/tests/test_docker_integration.py +17 -0
  47. monit_docker-1.3.0/tests/test_http_token_separation.py +28 -0
  48. {monit_docker-1.1.4 → monit_docker-1.3.0}/tests/test_monit_docker.py +13 -0
  49. monit_docker-1.3.0/tests/test_serve_config.py +83 -0
  50. monit_docker-1.1.4/RELEASE +0 -1
  51. monit_docker-1.1.4/VERSION +0 -1
  52. {monit_docker-1.1.4 → monit_docker-1.3.0}/LICENSE +0 -0
  53. {monit_docker-1.1.4 → monit_docker-1.3.0}/MANIFEST.in +0 -0
  54. {monit_docker-1.1.4 → monit_docker-1.3.0}/bin/monit-docker +0 -0
  55. {monit_docker-1.1.4 → monit_docker-1.3.0}/docs/access-checks.md +0 -0
  56. {monit_docker-1.1.4 → monit_docker-1.3.0}/docs/alerts.md +0 -0
  57. {monit_docker-1.1.4 → monit_docker-1.3.0}/docs/architecture-review-2026-09-27.md +0 -0
  58. {monit_docker-1.1.4 → monit_docker-1.3.0}/docs/architecture.md +0 -0
  59. {monit_docker-1.1.4 → monit_docker-1.3.0}/docs/audit-migration.md +0 -0
  60. {monit_docker-1.1.4 → monit_docker-1.3.0}/docs/beta-decisions.md +0 -0
  61. {monit_docker-1.1.4 → monit_docker-1.3.0}/docs/check-config.md +0 -0
  62. {monit_docker-1.1.4 → monit_docker-1.3.0}/docs/configuration-validation.md +0 -0
  63. {monit_docker-1.1.4 → monit_docker-1.3.0}/docs/contributing.md +0 -0
  64. {monit_docker-1.1.4 → monit_docker-1.3.0}/docs/contributors.rst +0 -0
  65. {monit_docker-1.1.4 → monit_docker-1.3.0}/docs/deprecation-policy.md +0 -0
  66. {monit_docker-1.1.4 → monit_docker-1.3.0}/docs/dwho-http-notifications.md +0 -0
  67. {monit_docker-1.1.4 → monit_docker-1.3.0}/docs/filesystems.md +0 -0
  68. {monit_docker-1.1.4 → monit_docker-1.3.0}/docs/grafana.md +0 -0
  69. {monit_docker-1.1.4 → monit_docker-1.3.0}/docs/healthchecks.md +0 -0
  70. {monit_docker-1.1.4 → monit_docker-1.3.0}/docs/images/grafana-cpu.png +0 -0
  71. {monit_docker-1.1.4 → monit_docker-1.3.0}/docs/images/grafana-network.png +0 -0
  72. {monit_docker-1.1.4 → monit_docker-1.3.0}/docs/images/grafana-overview.png +0 -0
  73. {monit_docker-1.1.4 → monit_docker-1.3.0}/docs/images/terminal-containers.png +0 -0
  74. {monit_docker-1.1.4 → monit_docker-1.3.0}/docs/images/terminal-details.png +0 -0
  75. {monit_docker-1.1.4 → monit_docker-1.3.0}/docs/images/terminal-journal.png +0 -0
  76. {monit_docker-1.1.4 → monit_docker-1.3.0}/docs/images/textual-containers.png +0 -0
  77. {monit_docker-1.1.4 → monit_docker-1.3.0}/docs/images/textual-journal.png +0 -0
  78. {monit_docker-1.1.4 → monit_docker-1.3.0}/docs/images/textual-unavailable.png +0 -0
  79. {monit_docker-1.1.4 → monit_docker-1.3.0}/docs/installation-upgrades.md +0 -0
  80. {monit_docker-1.1.4 → monit_docker-1.3.0}/docs/journal-compatibility.md +0 -0
  81. {monit_docker-1.1.4 → monit_docker-1.3.0}/docs/maintenance.md +0 -0
  82. {monit_docker-1.1.4 → monit_docker-1.3.0}/docs/metrics.md +0 -0
  83. {monit_docker-1.1.4 → monit_docker-1.3.0}/docs/notifications.md +0 -0
  84. {monit_docker-1.1.4 → monit_docker-1.3.0}/docs/performance-resilience.md +0 -0
  85. {monit_docker-1.1.4 → monit_docker-1.3.0}/docs/redis-notifications.md +0 -0
  86. {monit_docker-1.1.4 → monit_docker-1.3.0}/docs/release-1.0.0.md +0 -0
  87. {monit_docker-1.1.4 → monit_docker-1.3.0}/docs/release-1.0.1.md +0 -0
  88. {monit_docker-1.1.4 → monit_docker-1.3.0}/docs/release-1.1.0.md +0 -0
  89. {monit_docker-1.1.4 → monit_docker-1.3.0}/docs/release-1.1.1.md +0 -0
  90. {monit_docker-1.1.4 → monit_docker-1.3.0}/docs/release-1.1.2.md +0 -0
  91. {monit_docker-1.1.4 → monit_docker-1.3.0}/docs/release-1.1.3.md +0 -0
  92. {monit_docker-1.1.4 → monit_docker-1.3.0}/docs/release-1.1.4.md +0 -0
  93. {monit_docker-1.1.4 → monit_docker-1.3.0}/docs/restart-limit.md +0 -0
  94. {monit_docker-1.1.4 → monit_docker-1.3.0}/docs/runtime-checks.md +0 -0
  95. {monit_docker-1.1.4 → monit_docker-1.3.0}/docs/scenarios.md +0 -0
  96. {monit_docker-1.1.4 → monit_docker-1.3.0}/docs/shared-terminal.md +0 -0
  97. {monit_docker-1.1.4 → monit_docker-1.3.0}/docs/supported-environments.md +0 -0
  98. {monit_docker-1.1.4 → monit_docker-1.3.0}/docs/terminal.md +0 -0
  99. {monit_docker-1.1.4 → monit_docker-1.3.0}/docs/textual-review.md +0 -0
  100. {monit_docker-1.1.4 → monit_docker-1.3.0}/docs/textual.md +0 -0
  101. {monit_docker-1.1.4 → monit_docker-1.3.0}/docs/trigger-delay.md +0 -0
  102. {monit_docker-1.1.4 → monit_docker-1.3.0}/docs/troubleshooting.md +0 -0
  103. {monit_docker-1.1.4 → monit_docker-1.3.0}/docs/tutorial-memory.md +0 -0
  104. {monit_docker-1.1.4 → monit_docker-1.3.0}/docs/ui.md +0 -0
  105. {monit_docker-1.1.4 → monit_docker-1.3.0}/examples/grafana/monit-docker.json +0 -0
  106. {monit_docker-1.1.4 → monit_docker-1.3.0}/examples/monitoring/alertmanager.email-slack.yml +0 -0
  107. {monit_docker-1.1.4 → monit_docker-1.3.0}/examples/monitoring/alertmanager.email.yml +0 -0
  108. {monit_docker-1.1.4 → monit_docker-1.3.0}/examples/monitoring/alertmanager.redis.yml +0 -0
  109. {monit_docker-1.1.4 → monit_docker-1.3.0}/examples/monitoring/alertmanager.slack.yml +0 -0
  110. {monit_docker-1.1.4 → monit_docker-1.3.0}/examples/monitoring/alerts.runtime.test.yml +0 -0
  111. {monit_docker-1.1.4 → monit_docker-1.3.0}/examples/monitoring/alerts.runtime.yml +0 -0
  112. {monit_docker-1.1.4 → monit_docker-1.3.0}/examples/monitoring/alerts.test.yml +0 -0
  113. {monit_docker-1.1.4 → monit_docker-1.3.0}/examples/monitoring/alerts.yml +0 -0
  114. {monit_docker-1.1.4 → monit_docker-1.3.0}/examples/monitoring/compose.audit.yaml +0 -0
  115. {monit_docker-1.1.4 → monit_docker-1.3.0}/examples/monitoring/compose.notifications.yaml +0 -0
  116. {monit_docker-1.1.4 → monit_docker-1.3.0}/examples/monitoring/compose.redis.yaml +0 -0
  117. {monit_docker-1.1.4 → monit_docker-1.3.0}/examples/monitoring/dwho-http/http.json +0 -0
  118. {monit_docker-1.1.4 → monit_docker-1.3.0}/examples/monitoring/dwho-http/http.yml +0 -0
  119. {monit_docker-1.1.4 → monit_docker-1.3.0}/examples/monitoring/dwho-http/payload.json +0 -0
  120. {monit_docker-1.1.4 → monit_docker-1.3.0}/examples/monitoring/dwho-http/send.py +0 -0
  121. {monit_docker-1.1.4 → monit_docker-1.3.0}/examples/monitoring/grafana/dashboards.yml +0 -0
  122. {monit_docker-1.1.4 → monit_docker-1.3.0}/examples/monitoring/grafana/datasources.yml +0 -0
  123. {monit_docker-1.1.4 → monit_docker-1.3.0}/examples/monitoring/prometheus-notifications.yml +0 -0
  124. {monit_docker-1.1.4 → monit_docker-1.3.0}/examples/monitoring/prometheus.yml +0 -0
  125. {monit_docker-1.1.4 → monit_docker-1.3.0}/examples/monitoring/redis-webhook/Dockerfile +0 -0
  126. {monit_docker-1.1.4 → monit_docker-1.3.0}/examples/monitoring/redis-webhook/bridge.py +0 -0
  127. {monit_docker-1.1.4 → monit_docker-1.3.0}/examples/monitoring/redis-webhook/requirements.txt +0 -0
  128. {monit_docker-1.1.4 → monit_docker-1.3.0}/examples/monitoring/start.sh +0 -0
  129. {monit_docker-1.1.4 → monit_docker-1.3.0}/examples/scenarios.yml +0 -0
  130. {monit_docker-1.1.4 → monit_docker-1.3.0}/examples/tutorial-memory/compose.yaml +0 -0
  131. {monit_docker-1.1.4 → monit_docker-1.3.0}/examples/tutorial-memory/monit-docker.yml +0 -0
  132. {monit_docker-1.1.4 → monit_docker-1.3.0}/examples/tutorial-memory/worker.py +0 -0
  133. {monit_docker-1.1.4 → monit_docker-1.3.0}/examples/ui/compose.actions.yaml +0 -0
  134. {monit_docker-1.1.4 → monit_docker-1.3.0}/examples/ui/prepare.py +0 -0
  135. {monit_docker-1.1.4 → monit_docker-1.3.0}/monit_docker/__main__.py +0 -0
  136. {monit_docker-1.1.4 → monit_docker-1.3.0}/monit_docker/adapters/__init__.py +0 -0
  137. {monit_docker-1.1.4 → monit_docker-1.3.0}/monit_docker/adapters/access.py +0 -0
  138. {monit_docker-1.1.4 → monit_docker-1.3.0}/monit_docker/adapters/audit_http.py +0 -0
  139. {monit_docker-1.1.4 → monit_docker-1.3.0}/monit_docker/adapters/events.py +0 -0
  140. {monit_docker-1.1.4 → monit_docker-1.3.0}/monit_docker/adapters/scenarios.py +0 -0
  141. {monit_docker-1.1.4 → monit_docker-1.3.0}/monit_docker/adapters/selection.py +0 -0
  142. {monit_docker-1.1.4 → monit_docker-1.3.0}/monit_docker/adapters/state.py +0 -0
  143. {monit_docker-1.1.4 → monit_docker-1.3.0}/monit_docker/adapters/stats.py +0 -0
  144. {monit_docker-1.1.4 → monit_docker-1.3.0}/monit_docker/adapters/syntax.py +0 -0
  145. {monit_docker-1.1.4 → monit_docker-1.3.0}/monit_docker/adapters/validation_rules.py +0 -0
  146. {monit_docker-1.1.4 → monit_docker-1.3.0}/monit_docker/application.py +0 -0
  147. {monit_docker-1.1.4 → monit_docker-1.3.0}/monit_docker/application_state.py +0 -0
  148. {monit_docker-1.1.4 → monit_docker-1.3.0}/monit_docker/audit.py +0 -0
  149. {monit_docker-1.1.4 → monit_docker-1.3.0}/monit_docker/audit_forward.py +0 -0
  150. {monit_docker-1.1.4 → monit_docker-1.3.0}/monit_docker/audit_migrate.py +0 -0
  151. {monit_docker-1.1.4 → monit_docker-1.3.0}/monit_docker/cli_audit.py +0 -0
  152. {monit_docker-1.1.4 → monit_docker-1.3.0}/monit_docker/composition.py +0 -0
  153. {monit_docker-1.1.4 → monit_docker-1.3.0}/monit_docker/core/__init__.py +0 -0
  154. {monit_docker-1.1.4 → monit_docker-1.3.0}/monit_docker/core/manual.py +0 -0
  155. {monit_docker-1.1.4 → monit_docker-1.3.0}/monit_docker/core/metrics.py +0 -0
  156. {monit_docker-1.1.4 → monit_docker-1.3.0}/monit_docker/core/policy.py +0 -0
  157. {monit_docker-1.1.4 → monit_docker-1.3.0}/monit_docker/core/rules.py +0 -0
  158. {monit_docker-1.1.4 → monit_docker-1.3.0}/monit_docker/domain/__init__.py +0 -0
  159. {monit_docker-1.1.4 → monit_docker-1.3.0}/monit_docker/domain/filesystems.py +0 -0
  160. {monit_docker-1.1.4 → monit_docker-1.3.0}/monit_docker/domain/identifiers.py +0 -0
  161. {monit_docker-1.1.4 → monit_docker-1.3.0}/monit_docker/domain/maintenance.py +0 -0
  162. {monit_docker-1.1.4 → monit_docker-1.3.0}/monit_docker/domain/models.py +0 -0
  163. {monit_docker-1.1.4 → monit_docker-1.3.0}/monit_docker/domain/rules.py +0 -0
  164. {monit_docker-1.1.4 → monit_docker-1.3.0}/monit_docker/domain/runtime.py +0 -0
  165. {monit_docker-1.1.4 → monit_docker-1.3.0}/monit_docker/job.py +0 -0
  166. {monit_docker-1.1.4 → monit_docker-1.3.0}/monit_docker/manual_actions.py +0 -0
  167. {monit_docker-1.1.4 → monit_docker-1.3.0}/monit_docker/notification_audit.py +0 -0
  168. {monit_docker-1.1.4 → monit_docker-1.3.0}/monit_docker/observation.py +0 -0
  169. {monit_docker-1.1.4 → monit_docker-1.3.0}/monit_docker/outputs/__init__.py +0 -0
  170. {monit_docker-1.1.4 → monit_docker-1.3.0}/monit_docker/outputs/formatting.py +0 -0
  171. {monit_docker-1.1.4 → monit_docker-1.3.0}/monit_docker/outputs/prometheus.py +0 -0
  172. {monit_docker-1.1.4 → monit_docker-1.3.0}/monit_docker/service.py +0 -0
  173. {monit_docker-1.1.4 → monit_docker-1.3.0}/monit_docker/textual_demo.py +0 -0
  174. {monit_docker-1.1.4 → monit_docker-1.3.0}/monit_docker/textual_tui.py +0 -0
  175. {monit_docker-1.1.4 → monit_docker-1.3.0}/monit_docker/tui.py +0 -0
  176. {monit_docker-1.1.4 → monit_docker-1.3.0}/monit_docker.egg-info/dependency_links.txt +0 -0
  177. {monit_docker-1.1.4 → monit_docker-1.3.0}/monit_docker.egg-info/top_level.txt +0 -0
  178. {monit_docker-1.1.4 → monit_docker-1.3.0}/pyproject.toml +0 -0
  179. {monit_docker-1.1.4 → monit_docker-1.3.0}/scripts/capture_textual.py +0 -0
  180. {monit_docker-1.1.4 → monit_docker-1.3.0}/setup.cfg +0 -0
  181. {monit_docker-1.1.4 → monit_docker-1.3.0}/setup.py +0 -0
  182. {monit_docker-1.1.4 → monit_docker-1.3.0}/tests/test_access.py +0 -0
  183. {monit_docker-1.1.4 → monit_docker-1.3.0}/tests/test_access_docker.py +0 -0
  184. {monit_docker-1.1.4 → monit_docker-1.3.0}/tests/test_adapters.py +0 -0
  185. {monit_docker-1.1.4 → monit_docker-1.3.0}/tests/test_application_architecture.py +0 -0
  186. {monit_docker-1.1.4 → monit_docker-1.3.0}/tests/test_audit_migrate.py +0 -0
  187. {monit_docker-1.1.4 → monit_docker-1.3.0}/tests/test_audit_stream.py +0 -0
  188. {monit_docker-1.1.4 → monit_docker-1.3.0}/tests/test_beta_decisions.py +0 -0
  189. {monit_docker-1.1.4 → monit_docker-1.3.0}/tests/test_check_config.py +0 -0
  190. {monit_docker-1.1.4 → monit_docker-1.3.0}/tests/test_configuration_schema.py +0 -0
  191. {monit_docker-1.1.4 → monit_docker-1.3.0}/tests/test_core.py +0 -0
  192. {monit_docker-1.1.4 → monit_docker-1.3.0}/tests/test_cron.py +0 -0
  193. {monit_docker-1.1.4 → monit_docker-1.3.0}/tests/test_engine.py +0 -0
  194. {monit_docker-1.1.4 → monit_docker-1.3.0}/tests/test_filesystem_mode.py +0 -0
  195. {monit_docker-1.1.4 → monit_docker-1.3.0}/tests/test_filesystems.py +0 -0
  196. {monit_docker-1.1.4 → monit_docker-1.3.0}/tests/test_health.py +0 -0
  197. {monit_docker-1.1.4 → monit_docker-1.3.0}/tests/test_http_service_boundaries.py +0 -0
  198. {monit_docker-1.1.4 → monit_docker-1.3.0}/tests/test_httpdis_transport.py +0 -0
  199. {monit_docker-1.1.4 → monit_docker-1.3.0}/tests/test_journal_compatibility.py +0 -0
  200. {monit_docker-1.1.4 → monit_docker-1.3.0}/tests/test_maintenance.py +0 -0
  201. {monit_docker-1.1.4 → monit_docker-1.3.0}/tests/test_manual_actions.py +0 -0
  202. {monit_docker-1.1.4 → monit_docker-1.3.0}/tests/test_packaging.py +0 -0
  203. {monit_docker-1.1.4 → monit_docker-1.3.0}/tests/test_resilience.py +0 -0
  204. {monit_docker-1.1.4 → monit_docker-1.3.0}/tests/test_restart_limit.py +0 -0
  205. {monit_docker-1.1.4 → monit_docker-1.3.0}/tests/test_rule_literals.py +0 -0
  206. {monit_docker-1.1.4 → monit_docker-1.3.0}/tests/test_runtime_checks.py +0 -0
  207. {monit_docker-1.1.4 → monit_docker-1.3.0}/tests/test_runtime_docker.py +0 -0
  208. {monit_docker-1.1.4 → monit_docker-1.3.0}/tests/test_scenarios.py +0 -0
  209. {monit_docker-1.1.4 → monit_docker-1.3.0}/tests/test_service.py +0 -0
  210. {monit_docker-1.1.4 → monit_docker-1.3.0}/tests/test_stats_timeouts.py +0 -0
  211. {monit_docker-1.1.4 → monit_docker-1.3.0}/tests/test_stats_transport.py +0 -0
  212. {monit_docker-1.1.4 → monit_docker-1.3.0}/tests/test_terminal_docker.py +0 -0
  213. {monit_docker-1.1.4 → monit_docker-1.3.0}/tests/test_terminal_signals.py +0 -0
  214. {monit_docker-1.1.4 → monit_docker-1.3.0}/tests/test_trigger_delay.py +0 -0
  215. {monit_docker-1.1.4 → monit_docker-1.3.0}/tests/test_tui.py +0 -0
  216. {monit_docker-1.1.4 → monit_docker-1.3.0}/textual_tests/test_textual_tui.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: monit-docker
3
- Version: 1.1.4
3
+ Version: 1.3.0
4
4
  Summary: monit-docker
5
5
  Home-page: https://github.com/decryptus/monit-docker
6
6
  Author: Adrien Delle Cave
@@ -23,7 +23,7 @@ License-File: LICENSE
23
23
  Requires-Dist: cryptography>=3.2.1
24
24
  Requires-Dist: bitmath>=1.3.3.1
25
25
  Requires-Dist: docker>=2.7.0
26
- Requires-Dist: HTTPdis>=0.6.28
26
+ Requires-Dist: HTTPdis>=0.6.35
27
27
  Requires-Dist: Mako
28
28
  Requires-Dist: pyOpenSSL>=20.0.0
29
29
  Requires-Dist: PyYAML>=3.10
@@ -49,8 +49,8 @@ Dynamic: summary
49
49
 
50
50
  # monit-docker project
51
51
 
52
- **Current package and image version: [1.1.4](https://github.com/decryptus/monit-docker/tree/v1.1.4)**
53
- — [Release notes and upgrade guidance](docs/release-1.1.4.md).
52
+ **Current package and image version: [1.3.0](https://github.com/decryptus/monit-docker/tree/v1.3.0)**
53
+ — [Release notes and upgrade guidance](docs/release-1.3.0.md).
54
54
 
55
55
  <p align="center">
56
56
  <img src="https://raw.githubusercontent.com/decryptus/monit-docker/v0.0.63/ui/branding/monit-docker-logo.png" alt="monit-docker logo" width="640">
@@ -66,7 +66,7 @@ Dynamic: summary
66
66
  [Documentation (EN)](https://www.monit-docker.com/docs/en/) ·
67
67
  [Live demo](https://demo.monit-docker.com/) ·
68
68
  [Release roadmap](docs/roadmap.md) ·
69
- [1.1.4 release notes](docs/release-1.1.4.md) ·
69
+ [1.3.0 release notes](docs/release-1.3.0.md) ·
70
70
  [Logos and icons](ui/branding/README.md)
71
71
 
72
72
  monit-docker is a free, open-source tool for checking Docker containers and
@@ -77,7 +77,7 @@ container or reloading PHP-FPM when memory usage is high.
77
77
  Compose v2 and curl, run:
78
78
 
79
79
  ```sh
80
- git clone --branch v1.1.4 --depth 1 https://github.com/decryptus/monit-docker.git
80
+ git clone --branch v1.3.0 --depth 1 https://github.com/decryptus/monit-docker.git
81
81
  cd monit-docker
82
82
  ./install.sh
83
83
  ```
@@ -1,7 +1,7 @@
1
1
  # monit-docker project
2
2
 
3
- **Current package and image version: [1.1.4](https://github.com/decryptus/monit-docker/tree/v1.1.4)**
4
- — [Release notes and upgrade guidance](docs/release-1.1.4.md).
3
+ **Current package and image version: [1.3.0](https://github.com/decryptus/monit-docker/tree/v1.3.0)**
4
+ — [Release notes and upgrade guidance](docs/release-1.3.0.md).
5
5
 
6
6
  <p align="center">
7
7
  <img src="https://raw.githubusercontent.com/decryptus/monit-docker/v0.0.63/ui/branding/monit-docker-logo.png" alt="monit-docker logo" width="640">
@@ -17,7 +17,7 @@
17
17
  [Documentation (EN)](https://www.monit-docker.com/docs/en/) ·
18
18
  [Live demo](https://demo.monit-docker.com/) ·
19
19
  [Release roadmap](docs/roadmap.md) ·
20
- [1.1.4 release notes](docs/release-1.1.4.md) ·
20
+ [1.3.0 release notes](docs/release-1.3.0.md) ·
21
21
  [Logos and icons](ui/branding/README.md)
22
22
 
23
23
  monit-docker is a free, open-source tool for checking Docker containers and
@@ -28,7 +28,7 @@ container or reloading PHP-FPM when memory usage is high.
28
28
  Compose v2 and curl, run:
29
29
 
30
30
  ```sh
31
- git clone --branch v1.1.4 --depth 1 https://github.com/decryptus/monit-docker.git
31
+ git clone --branch v1.3.0 --depth 1 https://github.com/decryptus/monit-docker.git
32
32
  cd monit-docker
33
33
  ./install.sh
34
34
  ```
@@ -0,0 +1 @@
1
+ 1.3.0
@@ -0,0 +1 @@
1
+ 1.3.0
@@ -14,7 +14,7 @@ stderr for collection by Docker logging drivers or an external log collector.
14
14
  | Operation | Events and results | Actor |
15
15
  | --- | --- | --- |
16
16
  | CLI `monit` invocation | Started; succeeded or failed | Local operating-system username |
17
- | Automatic rule action | Started; succeeded or failed, duration and error/exec exit code when known | `rule-engine` (`cron` for the cron subcommand) |
17
+ | Automatic rule action | Started, then succeeded, failed, or unknown when Docker did not confirm the exec outcome. Includes duration and the exit code when known | `rule-engine` (`cron` for the cron subcommand) |
18
18
  | Matched rule delayed, in cooldown or dry-run | Skipped or simulated, with reason | `rule-engine` |
19
19
  | Authenticated manual request | Queued, started, completed or rejected, including protection/cooldown/expiry | Trusted proxy username, otherwise `anonymous` |
20
20
  | Alertmanager audit webhook | Each firing/resolved alert received; delivery `not_reported` | `alertmanager` |
@@ -229,6 +229,11 @@ retains its existing case-insensitive substring matching. Queued and In progress
229
229
  both select Pending. Exports follow the applied filters and current page.
230
230
  Quick filters use the applied view and replace unsubmitted form edits.
231
231
 
232
+ When upgrading the agent from 1.1.4, add `--trust-proxy-user` to the new agent's
233
+ `serve` options to preserve per-user journal cursors behind the authenticated
234
+ proxy, including in read-only mode. Without this option all holders of the read
235
+ secret share the `anonymous` reader identity. The 1.2.0 journal overlay sets this option.
236
+
232
237
  The API is disabled by default. Enable `serve --audit-read-token-file FILE` and
233
238
  supply an explicit global `--audit-file PATH`. Use a separate 64-character hex
234
239
  secret, never the action or notification secret. An authenticated proxy must
@@ -258,8 +263,8 @@ directory (the preparation script refuses to overwrite an existing directory).
258
263
  Add global `--audit-file /var/lib/monit-docker/audit/events.jsonl` **before**
259
264
  `serve`, then append `--audit-read-token-file /run/secrets/audit-token` to the
260
265
  serve options. Reuse the token and proxy-include mounts from
261
- `compose.journal.yaml`. Add `--trust-proxy-user` if manual action attribution
262
- should use the authenticated username. Compose replaces `command` lists: do not
266
+ `compose.journal.yaml`. Add `--trust-proxy-user` to bind journal cursors and attribute manual actions
267
+ to the authenticated username. Compose replaces `command` lists: do not
263
268
  stack the journal and actions overlays without combining their command options.
264
269
 
265
270
  Since 0.0.75, **View action** opens a separate **Action history** dialog for
@@ -11,13 +11,46 @@ automatique des conteneurs surveillés.
11
11
  | Agent et interface web | Base et `docker-compose.ui.yml` | `https://localhost:8443` |
12
12
  | Historique et graphiques | `examples/monitoring/compose.yaml` | Grafana sur le port 3000 |
13
13
 
14
+ ## Socket Docker filtré en option
15
+
16
+ Avec Compose **2.24.4 ou ultérieur**, depuis la racine du dépôt :
17
+
18
+ ```sh
19
+ export DOCKER_SOCKET_GID=$(stat -c %g "${DOCKER_SOCKET_PATH:-/var/run/docker.sock}")
20
+ docker compose -f docker-compose.yml -f docker-compose.socket-proxy.yml up -d --build --wait
21
+ ```
22
+
23
+ Seul le proxy monte le socket de l’hôte. L’agent le joint sur un réseau privé et
24
+ le proxy ne publie aucun port hôte. Par défaut, l’agent peut lire la version,
25
+ la liste et les détails des conteneurs, leurs statistiques, les événements et
26
+ les détails d’une image par son empreinte. L’inspection peut révéler les
27
+ variables d’environnement et les montages. Gardez ce réseau privé.
28
+
29
+ Pour autoriser d’autres opérations, exportez la variable voulue, puis relancez
30
+ la commande Compose. Chaque valeur est une liste d’**identifiants complets**
31
+ séparés par des espaces. Obtenez un identifiant avec
32
+ `docker inspect -f '{{.Id}}' NOM`. Actualisez la liste après toute recréation
33
+ du conteneur. Pour révoquer les nouvelles requêtes, supprimez la variable avec
34
+ `unset` et réappliquez la configuration.
35
+
36
+ | Variable | Droits sur les conteneurs désignés |
37
+ | --- | --- |
38
+ | `MONIT_PROXY_EXEC_TARGETS` | Sondes de fichiers et commandes Docker exec sans le mode privilégié, y compris en tant que root dans le conteneur |
39
+ | `MONIT_PROXY_LIFECYCLE_TARGETS` | Démarrage, arrêt et redémarrage |
40
+
41
+ Choisissez uniquement des conteneurs de confiance. Une commande dans un
42
+ conteneur privilégié ou disposant du socket Docker ou du système de fichiers
43
+ hôte peut donner accès à l’hôte. Le proxy lui-même conserve le vrai socket.
44
+ Les règles de supervision et les jetons pour les actions manuelles se
45
+ configurent séparément. Utilisez les deux mêmes fichiers Compose pour `down`.
46
+
14
47
  ## Installation guidée
15
48
 
16
49
  Sur Linux amd64, installer Git, Docker Engine, son plugin Compose v2 avec
17
50
  `up --wait` et curl. Pour le tableau de bord, prévoir Python 3 et OpenSSL.
18
51
 
19
52
  ```sh
20
- git clone --branch v1.1.4 --depth 1 https://github.com/decryptus/monit-docker.git
53
+ git clone --branch v1.3.0 --depth 1 https://github.com/decryptus/monit-docker.git
21
54
  cd monit-docker
22
55
  ./install.sh
23
56
  ```
@@ -104,7 +137,7 @@ Définir `MONIT_DOCKER_PORT`, `UI_PORT` ou `DOCKER_SOCKET_PATH` dans le shell av
104
137
  Compose si nécessaire. `UI_BIND` vaut `127.0.0.1` par défaut. Garder le même nom
105
138
  de projet et le même répertoire pour réutiliser le volume.
106
139
 
107
- Les images de l’agent et de l’UI sont fixées à **1.1.4**. Pour une évolution,
140
+ Les images de l’agent et de l’UI sont fixées à **1.3.0**. Pour une évolution,
108
141
  choisir des versions correspondantes, préserver la configuration et les données,
109
142
  puis utiliser `pull` et `up -d --wait` avec la même liste de fichiers. Un simple
110
143
  `pull` ne remplace pas les conteneurs en cours d’exécution.
@@ -121,6 +154,34 @@ nom de projet d’origine. Pour conserver des jobs, reprendre explicitement leur
121
154
  cibles et règles selon le [guide cron](cron.md), avec un état persistant et une
122
155
  simulation préalable. Aucune conversion automatique des règles n’est effectuée.
123
156
 
157
+ À partir de la version 1.3.0, la commande `monit-docker serve`
158
+ peut aussi lire ses réglages dans `monit-docker.yml`. Exemple :
159
+
160
+ ```yaml
161
+ serve:
162
+ port: 9810
163
+ interval: 60
164
+ rsc: [status, health]
165
+ status_token_file: /run/secrets/status
166
+ ```
167
+
168
+ Une option explicite en ligne de commande est prioritaire. Avec cet exemple,
169
+ `serve --port 9808 --rsc pid` écoute sur 9808, collecte uniquement le PID
170
+ et conserve l’intervalle et le chemin du jeton définis dans le fichier.
171
+ Les listes `rsc` et `cmd` sont remplacées en entier. Pour les noms de clés,
172
+ remplacer les tirets des options longues par des traits de soulignement.
173
+ La simulation ponctuelle utilise toujours `--dry-run`.
174
+ Pour désactiver temporairement un booléen activé dans `serve:`, utilisez
175
+ `--no-allow-actions`, `--no-allow-maintenance` ou `--no-trust-proxy-user`.
176
+
177
+ Pour protéger la lecture de `/v1/status`, montez un fichier secret dans
178
+ l’agent et ajoutez `--status-token-file /run/secrets/status` après `serve`.
179
+ Le fichier contient 64 caractères hexadécimaux minuscules. Utilisez un secret
180
+ distinct pour chaque usage. Les clients envoient le jeton dans l’en-tête Bearer
181
+ de la requête. Si vous utilisez le tableau de bord, configurez son proxy pour
182
+ ajouter cet en-tête uniquement sur la route de statut. Voir le [guide de
183
+ l’agent](serve.md).
184
+
124
185
  ## Continuer avec une démonstration
125
186
 
126
187
  Le [tutoriel mémoire](tutorial-memory.md) ajoute un conteneur jetable et permet
@@ -130,3 +191,23 @@ conteneur et la sélection exacte évitent de prendre un service existant comme
130
191
  La [pile Prometheus et Grafana](compose.md) reste une installation distincte pour
131
192
  l’historique. Arrêter la pile minimale ou modifier ses ports avant de la lancer.
132
193
  Les notifications demandent une [configuration supplémentaire](notifications.md).
194
+
195
+ ## Réglages de cron, stats et monit
196
+
197
+ La version 1.3.0 permet de placer les valeurs habituelles dans
198
+ trois sections de `monit-docker.yml`. Exemple pour une lecture de métriques :
199
+
200
+ ```yaml
201
+ stats:
202
+ rsc: [cpu_percent, mem_usage]
203
+ output: json
204
+ monit:
205
+ rsc: [status]
206
+ ```
207
+
208
+ `monit-docker stats --output text` utilise les ressources du fichier et affiche
209
+ du texte. Avec `monit --rsc status`, seules les mesures demandées sont lues,
210
+ même si le YAML définit une commande. Pour programmer une règle, renseignez
211
+ `cron.cmd` et `cron.state_file`, puis testez avec
212
+ `monit-docker --name web cron --dry-run`. Le [guide cron](cron.md) contient
213
+ un exemple complet.
@@ -11,13 +11,44 @@ stack. None of these installations enables automatic container actions by defaul
11
11
  | Agent and web UI | Base plus `docker-compose.ui.yml` | `https://localhost:8443` |
12
12
  | Metrics history and dashboards | `examples/monitoring/compose.yaml` | Grafana on `http://127.0.0.1:3000` |
13
13
 
14
+ ## Optional filtered Docker socket
15
+
16
+ With Compose **2.24.4 or newer**, run these commands at the repository root:
17
+
18
+ ```sh
19
+ export DOCKER_SOCKET_GID=$(stat -c %g "${DOCKER_SOCKET_PATH:-/var/run/docker.sock}")
20
+ docker compose -f docker-compose.yml -f docker-compose.socket-proxy.yml up -d --build --wait
21
+ ```
22
+
23
+ Only the proxy mounts the host socket. The agent reaches it on a private network;
24
+ the proxy publishes no host port. Observation permits version discovery, container
25
+ listing, inspection, stats, events and image inspection by digest. Inspection can
26
+ reveal environment variables and mounts. Keep the proxy network private.
27
+
28
+ To grant additional operations, export either variable and repeat the Compose
29
+ command. Each value is a space-separated list of **full container IDs**. Get an
30
+ ID with `docker inspect -f '{{.Id}}' NAME`. Update the list after a target is recreated.
31
+ Unset the variable and reapply the command to revoke new requests.
32
+
33
+ | Variable | Grants on the listed targets |
34
+ | --- | --- |
35
+ | `MONIT_PROXY_EXEC_TARGETS` | Filesystem probes and arbitrary non-privileged Docker execs, including commands as root inside the target |
36
+ | `MONIT_PROXY_LIFECYCLE_TARGETS` | Start, stop and restart |
37
+
38
+ Choose trusted workload containers only. An exec into a privileged container or
39
+ one with a host filesystem or Docker socket mount can grant host access. The
40
+ allowlist limits the Docker API available to the agent; the proxy process itself
41
+ holds the real socket. These settings grant transport access. Configure any
42
+ monitoring rules or manual action credentials separately. Use the same pair of
43
+ Compose files for `down`.
44
+
14
45
  ## Guided installation
15
46
 
16
47
  On Linux amd64, install Git, Docker Engine, its Compose v2 plugin with
17
48
  `up --wait` support, and curl. For the web dashboard, install Python 3 and OpenSSL.
18
49
 
19
50
  ```sh
20
- git clone --branch v1.1.4 --depth 1 https://github.com/decryptus/monit-docker.git
51
+ git clone --branch v1.3.0 --depth 1 https://github.com/decryptus/monit-docker.git
21
52
  cd monit-docker
22
53
  ./install.sh
23
54
  ```
@@ -116,7 +147,7 @@ host ports. The UI binds to loopback unless `UI_BIND` is explicitly changed.
116
147
  Changing a host port does not change internal agent addresses. Keep the same
117
148
  directory/project name so Compose reuses its named volume.
118
149
 
119
- The examples pin agent and UI to **1.1.4**. When updating versions, preserve your
150
+ The examples pin agent and UI to **1.3.0**. When updating versions, preserve your
120
151
  configuration and state, choose matching agent/UI versions, then pull and recreate
121
152
  the selected stack. `docker compose pull` alone does not change a running container.
122
153
 
@@ -140,7 +140,7 @@ backups; archive them separately if you rely on this history.
140
140
 
141
141
  ## Customize
142
142
 
143
- The services are pinned to monit-docker 1.1.4, Prometheus 3.5.0 and Grafana 12.2.0.
143
+ The services are pinned to monit-docker 1.3.0, Prometheus 3.5.0 and Grafana 12.2.0.
144
144
  Update versions deliberately in `examples/monitoring/compose.yaml`, then run
145
145
  `docker compose pull` and `sh start.sh`. The repository-root `docker-compose.yml`
146
146
  runs the minimal observation agent; use the file in `examples/monitoring` for this
@@ -156,3 +156,21 @@ add explicit rules, a persistent state-directory mount and `--state-file`, and
156
156
  start with `--dry-run`. Prometheus alerts only report conditions; they do not
157
157
  execute agent actions. Notification delivery requires a separately configured
158
158
  Alertmanager; [email and Slack examples](notifications.md) are included.
159
+
160
+ ## Optional authentication for metrics
161
+
162
+ By default Prometheus can scrape `/metrics` without credentials. To protect
163
+ this endpoint, create a dedicated secret file with `(umask 077; openssl rand -hex 32 > metrics-token)` in a private directory. Mount
164
+ the resulting file read-only in both containers and pass
165
+ `--metrics-token-file /run/secrets/metrics` after `monit-docker serve`.
166
+ Add the following to the matching Prometheus scrape job:
167
+
168
+ ```yaml
169
+ authorization:
170
+ type: Bearer
171
+ credentials_file: /run/secrets/metrics
172
+ ```
173
+
174
+ Use HTTPS when scraping across an untrusted network. The token only grants
175
+ access to metrics. For authenticated status reads, use the independent
176
+ `--status-token-file` option described in [serve mode](serve.md).
@@ -40,8 +40,22 @@ is rendered once; runtime and offline checks use the same validation. See the
40
40
  | `dir-groups` | `NAME: {paths: [STRING, ...], access: MAPPING}` | Nonempty absolute container paths; `access` is optional unless an access probe is requested |
41
41
  | `conditions` | `NAME: {expr: [STRING, ...]}` | Nonempty list of conditions combined with AND |
42
42
  | `commands` | `NAME: {exec: [ACTION, ...]}` | Nonempty ordered action sequence |
43
+ | `stats` | Mapping | `rsc` (ordered list), `output` (`text` or `json`) |
44
+ | `monit` | Mapping | `rsc` or `cmd` (ordered list), `propagate_exit_code` (boolean) |
45
+ | `cron` | Mapping | `cmd`, `state_file`, `cooldown`, `trigger_after`, `max_gap`, `max_restarts`, `propagate_exit_code` |
46
+ | `serve` | Mapping | Defaults for direct `serve`; explicit CLI options take precedence (see [serve](serve.md#configure-serve-in-yaml)) |
43
47
  | `scenarios` | `NAME: MAPPING` | A named `stats`, `cron` or `serve` job |
44
48
 
49
+ These direct command sections are available since 1.3.0. Each command
50
+ reads its own section. Explicit flags override individual YAML fields, even at
51
+ their built-in default value. Repeating `--rsc` or `--cmd` / `--cmd-if` replaces
52
+ the complete YAML list in argument order. For `monit`, choosing `--rsc` also
53
+ discards configured commands and their exit-code policy for that invocation.
54
+ Choosing `--cmd` discards configured resources. Use `--no-propagate-exit-code`
55
+ to override `propagate_exit_code: true`. Simulation is requested with the
56
+ `--dry-run` flag. Global selectors still go before the subcommand. Named
57
+ scenarios keep their own settings.
58
+
45
59
  Command/condition aliases and directory-group names use an ASCII letter followed
46
60
  by at most 64 letters, digits, underscores, dots or hyphens. Scenario names match
47
61
  `[a-z0-9][a-z0-9-]{0,63}` and are selected exactly. Client and container-group names
@@ -222,8 +236,11 @@ a lock and audit simulated decisions while preserving durable policy state.
222
236
  | `--allow-actions` | `serve` | Off; requires state, action token and exact HTTPS origin |
223
237
  | `--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
238
  | `--action-cooldown` | `serve` | 30 seconds; finite and at least 1 |
225
- | `--allow-maintenance`, `--trust-proxy-user` | `serve` | Off; require `--allow-actions` |
239
+ | `--allow-maintenance` | `serve` | Off; requires `--allow-actions` |
240
+ | `--trust-proxy-user` | `serve` | Off; requires manual actions or an audit read token. Trust the authenticated proxy to supply the username. |
226
241
  | `--audit-read-token-file` | `serve` | Off; requires explicit audit path and a distinct read secret |
242
+ | `--status-token-file` | `serve` | Optional dedicated bearer secret for GET and HEAD on `/v1/status` |
243
+ | `--metrics-token-file` | `serve` | Optional dedicated bearer secret for GET and HEAD on `/metrics` |
227
244
  | `--notification-token-file` | `serve` | Off; private notification ingestion secret |
228
245
 
229
246
  Keep one persistent state path per Docker host/job. A busy state lock fails
@@ -269,7 +286,7 @@ execution do. Disk/inode/mount-mode resources do not require it.
269
286
  | 110 | Configuration, alias, scenario or value error handled as such |
270
287
  | 114 | No container selected |
271
288
  | 115 | Required observation unavailable |
272
- | 116 | Action failure; default for failed in-container exec |
289
+ | 116 | Action failure or unknown exec outcome. See [exec wait limits](cron.md#exit-codes-and-limits) |
273
290
  | 117 | Persistent state lock busy |
274
291
  | 118 | State read/write/validation failure |
275
292
  | 119 | Audit error, or handled OS/value errors in local administration commands |
@@ -131,7 +131,7 @@ Leave the lock file in place.
131
131
  | 110 | Invalid configuration or action |
132
132
  | 114 | No matching container |
133
133
  | 115 | Incomplete statistics |
134
- | 116 | Action failed (existing default) |
134
+ | 116 | Action failed or its outcome is unknown |
135
135
  | 117 | Another process holds this job's lock |
136
136
  | 118 | State cannot be safely loaded or saved |
137
137
  | 170 / 180 | Existing Docker connection / API errors |
@@ -141,7 +141,35 @@ can return its own code instead of 116, including values that overlap agent
141
141
  codes. Check diagnostics to distinguish them. Other existing exit codes retain
142
142
  their meaning.
143
143
 
144
+ An exec action waits up to 60 seconds for a Docker exit status. For a long
145
+ command, set `kwargs.exec_timeout` on its YAML command alias (integer seconds,
146
+ 1 to 86400). This limit also applies to rule execs in `monit` and `serve`.
147
+
148
+ On expiry the cycle stops, releases its state lock, and records `result=unknown`
149
+ in the audit journal. An interrupted connection or unavailable exit status
150
+ also produces an unknown result. Check the container before retrying: the
151
+ command may still run. Later observation cycles can proceed. The same live
152
+ executor refuses further execs while its outstanding SDK call is pending.
153
+ A separate cron process or a later rule evaluation can submit the command again.
154
+
144
155
  There is no background scheduler or HTTP listener. The optional [trigger delay](trigger-delay.md) tracks sustained conditions.
145
156
  There is no cycle-wide deadline or hysteresis. Existing Docker client timeouts still apply; a hung cycle can hold its
146
157
  lock until it exits or is terminated. [Serve mode](serve.md) reuses the same
147
158
  engine and cooldown policy for continuous monitoring.
159
+
160
+ ## Defaults for the direct cron command
161
+
162
+ Starting with version 1.3.0, a top-level section can supply
163
+ the rule list, persistent state and restart policy:
164
+
165
+ ```yaml
166
+ cron:
167
+ state_file: /var/lib/monit-docker/web.json
168
+ cmd: ['mem_percent > 90 ? restart']
169
+ cooldown: 300
170
+ max_restarts: 2
171
+ ```
172
+
173
+ Preview with `monit-docker --name web cron --dry-run`. A scheduled invocation of
174
+ `monit-docker --name web cron` executes one cycle. Add `--cooldown 600` to
175
+ override just that value. Keep the same selector and state file for the job.
@@ -15,6 +15,14 @@ routes, adds authentication and may return its own error responses. In
15
15
  particular, the public demo does not forward `/metrics`, `/healthz`, `/readyz`
16
16
  or the notification receiver. Use the private agent address in the examples.
17
17
 
18
+ The agent allows 5 seconds of inactivity per socket read. HTTPdis also limits
19
+ the request line and headers together to 10 seconds, even if bytes keep
20
+ arriving. It closes an incomplete request at that deadline. After authentication
21
+ and size checks, the body has a separate budget of 10 seconds plus one second
22
+ per 32 KiB of declared length (up to 12 seconds for the 64 KiB notification
23
+ route). A body timeout returns HTTP 408 and closes the connection before the
24
+ action or notification is submitted.
25
+
18
26
  Agent JSON responses use `application/json; charset=utf-8`, a trailing newline,
19
27
  and finite JSON numbers. Normal route responses and adapter errors include:
20
28
 
@@ -34,8 +42,8 @@ or explicitly starts a monitoring cycle. Reads never execute Docker actions.
34
42
  | --- | --- | --- | --- |
35
43
  | `/healthz` | GET, HEAD | Always, no agent credential | 200 `{"alive":true}` |
36
44
  | `/readyz` | GET, HEAD | Always, no agent credential | 200 `{"ready":true}` or 503 `{"ready":false}` |
37
- | `/v1/status` | GET, HEAD | Always, no agent credential | 200 cached status, including degraded states |
38
- | `/metrics` | GET, HEAD | Always, no agent credential | 200 Prometheus text, including degraded states |
45
+ | `/v1/status` | GET, HEAD | Dedicated bearer token when `--status-token-file` is configured | 200 cached status, including degraded states |
46
+ | `/metrics` | GET, HEAD | Dedicated bearer token when `--metrics-token-file` is configured | 200 Prometheus text, including degraded states |
39
47
  | `/v1/actions` | POST | Manual actions enabled; action token and exact Origin | 202 request record |
40
48
  | `/v1/audit` | GET, HEAD | Journal reader enabled; audit token and actor | 200 bounded event page |
41
49
  | `/v1/audit/export` | GET, HEAD | Same journal authentication | 200 JSONL or CSV attachment |
@@ -201,8 +209,10 @@ exposed. Reasons and state names remain English machine-readable values.
201
209
 
202
210
  ## Journal pages and exports
203
211
 
204
- Both routes require exactly one `X-Monit-Audit-Token` and one valid
205
- `X-Monit-Actor`, with the same actor length/control restrictions as above.
212
+ Both routes require exactly one `X-Monit-Audit-Token`. By default the server ignores
213
+ `X-Monit-Actor` and binds cursors to a shared `anonymous` identity. With
214
+ `--trust-proxy-user`, each request requires one valid `X-Monit-Actor` from the
215
+ authenticated proxy and cursors are bound to that user.
206
216
  Authentication applies even to an empty journal. HTTP 200 returns:
207
217
 
208
218
  | Field | Type / meaning |
@@ -226,7 +236,7 @@ policy remains a separate roadmap item.
226
236
  | `container` | Case-insensitive substring of container name or ID, not a glob or regular expression |
227
237
  | `source` | `manual` or `automatic` |
228
238
  | `category` | `action` or `notification` |
229
- | `result` | `pending`, `succeeded`, `failed`, `rejected`, `skipped`, `simulated`, `accepted`, `received` |
239
+ | `result` | `pending`, `succeeded`, `failed`, `unknown`, `rejected`, `skipped`, `simulated`, `accepted`, `received` |
230
240
  | `correlation_id` | Exact, case-sensitive ID |
231
241
  | `cursor` | Opaque signed continuation or page token |
232
242
  | `format` | `jsonl` (default) or `csv`; affects the export route, not the JSON page envelope |
@@ -55,6 +55,8 @@ For installation and the command reference, see the
55
55
  check-config
56
56
  configuration-validation
57
57
  textual
58
+ release-1.3.0
59
+ release-1.2.0
58
60
  release-1.1.4
59
61
  release-1.1.3
60
62
  release-1.1.2
@@ -0,0 +1,14 @@
1
+ # monit-docker 1.2.0
2
+
3
+ Upgrade the agent and dashboard together. Pin both images to `1.2.0`, or install the Python package with `python -m pip install --upgrade 'monit-docker==1.2.0'`. Keep the existing state volume, audit journal and backups.
4
+
5
+ ## Before restarting the agent
6
+
7
+ - If you enabled actions, notification ingestion or journal reads, use a different secret for each enabled capability. Reusing credentials can prevent startup. Update the agent and its callers together.
8
+ - For separate journal cursors behind an authenticated reverse proxy, enable `serve --trust-proxy-user`, including on read-only installations. Restrict access to the agent and make the proxy overwrite the actor header. Otherwise readers share the anonymous cursor.
9
+ - Prometheus access remains open by default. To protect `/metrics`, set `serve --metrics-token-file FILE` and configure the scraper with the matching bearer token. This does not protect `/v1/status`.
10
+ - Docker exec now waits up to 60 seconds by default. Set `exec_timeout` (1–86400 seconds) for a command that needs longer. A timeout records an unknown outcome: the command can continue inside the container. Check its result before retrying.
11
+
12
+ ## Docker access
13
+
14
+ The agent no longer changes the process-wide Docker endpoint. An optional Compose socket proxy restricts Docker API access; existing installations can continue to use their socket mount. See [Compose installation](https://github.com/decryptus/monit-docker/blob/v1.2.0/docs/compose-quickstart.md) for the overlay, required socket group and explicit action targets.
@@ -0,0 +1,26 @@
1
+ # monit-docker 1.3.0
2
+
3
+ The direct commands now read their own optional sections in `monit-docker.yml`.
4
+ For example, `stats: {rsc: [cpu_percent, mem_usage], output: json}` selects two
5
+ measurements. Running `monit-docker stats --output text` changes the output
6
+ format for one invocation.
7
+
8
+ ## Upgrade from 1.2.0
9
+
10
+ Pin the agent and UI images to `1.3.0`, or install the package with
11
+ `python -m pip install --upgrade 'monit-docker==1.3.0'`. Existing command lines
12
+ work with their previous defaults. Upgrade before adding the new YAML sections.
13
+ Keep existing state, audit files and secrets. For a rollback to 1.2.0, restore
14
+ the previous configuration and command line before starting the older agent.
15
+
16
+ - Each of `serve`, `cron`, `stats` and `monit` reads only its own section. An
17
+ explicit flag overrides that field. Repeated `--rsc` or `--cmd` flags replace
18
+ the corresponding YAML list. `monit --rsc` selects observation even if YAML
19
+ configures an action. Use `--dry-run` to preview rules for one invocation.
20
+ - To protect `GET` and `HEAD /v1/status`, set `serve.status_token_file` or pass
21
+ `--status-token-file FILE`. Give clients a dedicated bearer token. When using
22
+ the dashboard, configure its authenticated proxy to inject this token only
23
+ on the upstream status route. Prometheus uses its own metrics credential.
24
+
25
+ See the [configuration reference](https://github.com/decryptus/monit-docker/blob/v1.3.0/docs/config-cli-contract.md)
26
+ and [serve guide](https://github.com/decryptus/monit-docker/blob/v1.3.0/docs/serve.md).
@@ -12,6 +12,14 @@ acceptance now has separate post-release evidence, recorded below. See
12
12
  scope and known limits, and inspect the tagged revision's workflow results for
13
13
  actual automated acceptance.
14
14
 
15
+ ## 1.3.0 configuration for direct commands
16
+
17
+ The [1.3.0 release](release-1.3.0.md) adds per-command YAML settings and optional bearer authentication for status reads.
18
+
19
+ ## 1.2.0 security and reliability
20
+
21
+ See the [upgrade notes](release-1.2.0.md) before updating API credentials or the journal proxy.
22
+
15
23
  ## 1.1.4 guided installation
16
24
 
17
25
  The [1.1.4 release](release-1.1.4.md) includes the local Compose installer and repeat-installation checks.
@@ -50,7 +50,65 @@ accepts 1–65535. Without `--cmd`, the process observes containers only and nee
50
50
  no state file. All resources are collected by default; repeated `--rsc` options
51
51
  select a subset, for example `--rsc cpu_percent --rsc mem_usage`.
52
52
 
53
- The agent has no read authentication, TLS or embedded UI. The optional
53
+ ### Configure serve in YAML
54
+
55
+ Version 1.3.0 accepts a top-level `serve` section in
56
+ `monit-docker.yml`. For example:
57
+
58
+ ```yaml
59
+ serve:
60
+ bind: 127.0.0.1
61
+ port: 9810
62
+ interval: 60
63
+ rsc: [status, health]
64
+ status_token_file: /run/secrets/status
65
+ ```
66
+
67
+ Start this configuration with `monit-docker serve`, or select a file with
68
+ `monit-docker -c /path/to/monit-docker.yml serve`. An explicit CLI option
69
+ overrides that YAML field, even when the argument equals the built-in default.
70
+ For example, `serve --port 9808 --rsc pid` uses port 9808, collects only PID,
71
+ and keeps the configured interval and status token file.
72
+
73
+ Use the long flag name with underscores in place of hyphens. Use YAML
74
+ booleans for switches and ordered lists for `rsc` and `cmd` (including
75
+ conditional rules). Each CLI list replaces the whole corresponding YAML
76
+ list. To turn off a YAML switch for one launch, use `--no-allow-actions`,
77
+ `--no-allow-maintenance` or `--no-trust-proxy-user`. Keep only file paths in the five token settings. `--dry-run` is
78
+ CLI-only. Global options still precede the subcommand. Named scenarios
79
+ (`monit-docker run NAME`) use their own configuration. The
80
+ [configuration reference](config-cli-contract.md) lists the available settings.
81
+
82
+ | Purpose | Keys under `serve:` |
83
+ |---|---|
84
+ | HTTP listener | `bind`, `port` |
85
+ | Collection | `interval`, `stale_after`, `rsc` |
86
+ | Automatic actions | `cmd`, `state_file`, `cooldown`, `trigger_after`, `max_gap`, `max_restarts` |
87
+ | Manual actions and proxy identity | `allow_actions`, `allow_maintenance`, `action_origin`, `action_cooldown`, `trust_proxy_user` |
88
+ | Secret file paths | `action_token_file`, `audit_read_token_file`, `notification_token_file`, `metrics_token_file`, `status_token_file` |
89
+
90
+ To protect the cached status (container names, IDs and measurements), start the
91
+ agent with `monit-docker serve --status-token-file /run/secrets/status`.
92
+ Use a dedicated file containing 64 lowercase hexadecimal characters and an
93
+ optional final newline. The agent loads the file at startup. GET and HEAD
94
+ require a single `Authorization: Bearer TOKEN` header when enabled. Missing
95
+ or incorrect credentials return HTTP 403. Health and readiness probes stay
96
+ available; Prometheus uses its own `--metrics-token-file`.
97
+
98
+ For example, read status through a local connection or a trusted HTTPS endpoint
99
+ without passing the secret as a command-line argument:
100
+
101
+ ```sh
102
+ { printf 'Authorization: Bearer '; tr -d '\n' < /run/secrets/status; printf '\n'; } |
103
+ curl --fail --silent --show-error --header @- "$AGENT_URL/v1/status"
104
+ ```
105
+
106
+ When using the web UI, configure its authenticated reverse proxy to inject the
107
+ status bearer on the upstream `/v1/status` location. The stock Nginx
108
+ configuration clears the upstream Authorization header. Replace that directive
109
+ for this location only and keep the secret on the proxy, outside browser code.
110
+
111
+ The optional
54
112
  [separate UI component](ui.md) supplies an authenticated Nginx frontend. Manual
55
113
  start/stop/restart is disabled by default; enabling its API requires explicit
56
114
  configuration, a proxy secret, an allowed HTTPS origin and persistent state.
@@ -98,3 +98,21 @@ to switch modes to run simple checks or scheduled rules. Both modes use the
98
98
  same selectors and rule syntax.
99
99
 
100
100
  If a command fails, start with [troubleshooting](troubleshooting.md).
101
+
102
+ ## Defaults for direct stats and monit commands
103
+
104
+ Starting with version 1.3.0, add these optional sections to
105
+ `monit-docker.yml`:
106
+
107
+ ```yaml
108
+ stats:
109
+ rsc: [cpu_percent, mem_usage]
110
+ output: json
111
+ monit:
112
+ rsc: [status]
113
+ ```
114
+
115
+ Run `monit-docker stats` for JSON or `monit-docker stats --output text` for a
116
+ one-time text report. Run `monit-docker --name web monit` to check the selected
117
+ container's status. See the [configuration reference](config-cli-contract.md)
118
+ for rule lists and exit codes.
@@ -1,6 +1,6 @@
1
1
  services:
2
2
  monit-docker:
3
- image: decryptus/monit-docker:1.1.4
3
+ image: decryptus/monit-docker:1.3.0
4
4
  command: [monit-docker, serve, --bind, 0.0.0.0, --interval, '30']
5
5
  restart: unless-stopped
6
6
  stop_grace_period: 60s
@@ -0,0 +1,10 @@
1
+ FROM alpine@sha256:be2656061b536c1883c4034790e21d0a09c5aaaf51968b89368a3c0371ea2c9a AS build
2
+ RUN apk add --no-cache go
3
+ WORKDIR /src
4
+ COPY main.go .
5
+ RUN CGO_ENABLED=0 go build -trimpath -o /socket-proxy main.go
6
+
7
+ FROM scratch
8
+ COPY --from=build /socket-proxy /socket-proxy
9
+ USER 65534:65534
10
+ ENTRYPOINT ["/socket-proxy"]