Skip to content

[Audit] S9 Safety: No Docker health checks in docker-compose services #28

@mvillmow

Description

@mvillmow

Audit Finding

Severity: MAJOR
Section: 9. Safety & Reliability
Grade Impact: This finding contributes to the F grade for this section.

Summary

None of the five services in docker-compose.yml define Docker health checks. Without health checks, Docker (or Podman) cannot determine whether a service is actually healthy or just running. The depends_on directives only wait for container start, not service readiness, which can cause startup race conditions.

Evidence

  • File: docker-compose.yml lines 6-89
  • Observed: No healthcheck block in any of the five service definitions (prometheus, loki, promtail, grafana, argus-exporter)
  • Expected: Each service should have a healthcheck block with appropriate test commands:
    • Prometheus: wget --spider http://localhost:9090/-/ready
    • Loki: wget --spider http://localhost:3100/ready
    • Grafana: wget --spider http://localhost:3000/api/health
    • Exporter: wget --spider http://localhost:9100/health

Principle Violation

POLA: Docker Compose users expect depends_on with condition: service_healthy to ensure proper startup ordering. Without health checks, services may start before their dependencies are ready, causing transient errors on first boot.

Recommendation

Add healthcheck blocks to each service in docker-compose.yml. Example for Prometheus:

healthcheck:
  test: ["CMD", "wget", "--spider", "-q", "http://localhost:9090/-/ready"]
  interval: 15s
  timeout: 5s
  retries: 3
  start_period: 10s

Then update depends_on to use condition: service_healthy.

Impact

Services may fail on initial scrape attempts after just start because dependencies are not yet ready. This leads to confusing error messages and requires manual restarts or waiting.


Filed by HomericIntelligence ecosystem audit (repo-analyze-strict methodology)
Audit date: 2026-03-22

Metadata

Metadata

Assignees

No one assigned

    Labels

    auditEcosystem audit findingmajorMajor severity

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions