No service in compose.yaml sets mem_limit, cpus, deploy.resources,
pids_limit or ulimits. On a 2012 MacBook Pro with 7.6 GB shared between six
containers, any one of them can take the host down, and the first symptom would
be the monitoring stack going away.
Current steady-state usage, for sizing:
| container |
memory |
| grafana |
246 MiB |
| prometheus |
137 MiB |
| alloy |
128 MiB |
| loki |
115 MiB |
| alertmanager |
19 MiB |
| snmp-exporter |
16 MiB |
Two knock-on effects:
ContainerHighMemory can never fire without a limit to measure against —
tracked separately.
- Prometheus retention is time-only (
--storage.tsdb.retention.time=30d) with
no --storage.tsdb.retention.size, so disk growth is likewise unbounded and
handled reactively by HostDiskWillFillIn24h rather than prevented. 23 G of
98 G used today.
Also absent, and worth deciding on separately: read_only, cap_drop,
security_opt: no-new-privileges. Alloy is the one that cannot have most of
them — it is privileged: true with the Docker socket and /:/rootfs — which
is its own argument for limiting the others.
Found while verifying #12.
No service in
compose.yamlsetsmem_limit,cpus,deploy.resources,pids_limitorulimits. On a 2012 MacBook Pro with 7.6 GB shared between sixcontainers, any one of them can take the host down, and the first symptom would
be the monitoring stack going away.
Current steady-state usage, for sizing:
Two knock-on effects:
ContainerHighMemorycan never fire without a limit to measure against —tracked separately.
--storage.tsdb.retention.time=30d) withno
--storage.tsdb.retention.size, so disk growth is likewise unbounded andhandled reactively by
HostDiskWillFillIn24hrather than prevented. 23 G of98 G used today.
Also absent, and worth deciding on separately:
read_only,cap_drop,security_opt: no-new-privileges. Alloy is the one that cannot have most ofthem — it is
privileged: truewith the Docker socket and/:/rootfs— whichis its own argument for limiting the others.
Found while verifying #12.