refactor(docker): container CPU and memory live in the one metric store (#5752)
#5752 "Container CPU and memory history lives in the one metric store; docker_metrics and docker_metrics_hourly are retired". Container cpu_pct and mem_pct already went to plugin_metrics for alerting; now mem_usage_bytes does too, and every snapshot in an ingest (backlog included) is recorded at its own time. The container history chart, Busiest Containers, a service's history and the MCP container tools read plugin_metrics under resource "<host>/<container>", rolled up and pruned by the shared metric retention. docker_012_drop_metrics drops both tables. Their history is not copied (lesson #5221 "A data migration's cost is set by the live table"); the store already holds 7 days of container CPU and memory %. Docker retention now prunes only lifecycle events, and Settings -> Thresholds has one "Metric retention" card for every source. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -104,18 +104,13 @@
|
||||
</div>
|
||||
|
||||
<div class="card" style="max-width:640px;margin-top:1.5rem;">
|
||||
<h2 class="section-title" style="margin-bottom:0.5rem;">Docker data retention</h2>
|
||||
<h2 class="section-title" style="margin-bottom:0.5rem;">Docker lifecycle events</h2>
|
||||
<p style="font-size:0.82rem;color:var(--text-muted);margin-bottom:1.25rem;">
|
||||
Bounds how much Docker history is stored. Raw per-sample container metrics are
|
||||
kept for the raw window, then rolled up into hourly averages kept for the
|
||||
rollup window; lifecycle events are kept for the events window. Applied by the
|
||||
hourly cleanup task — a change takes effect on its next run.
|
||||
How long container start, stop, die and health changes are kept. Container CPU
|
||||
and memory are kept with the other metrics, under Metric retention below.
|
||||
Applied by the hourly cleanup task — a change takes effect on its next run.
|
||||
</p>
|
||||
|
||||
{{ days("Raw metrics", "docker_metrics_raw_days", "docker.retention.metrics_raw_days",
|
||||
"Keep per-sample container CPU/memory points this long, then roll up to hourly.") }}
|
||||
{{ days("Rolled-up metrics", "docker_metrics_rollup_days", "docker.retention.metrics_rollup_days",
|
||||
"Keep the hourly-averaged series this long for multi-day history.") }}
|
||||
{{ days("Lifecycle events", "docker_events_days", "docker.retention.events_days",
|
||||
"Keep container start/stop/die/health history this long.") }}
|
||||
</div>
|
||||
@@ -169,16 +164,18 @@
|
||||
</div>
|
||||
|
||||
<div class="card" style="max-width:640px;margin-top:1rem;">
|
||||
<h2 class="section-title" style="margin-bottom:0.5rem;">Host metrics retention</h2>
|
||||
<h2 class="section-title" style="margin-bottom:0.5rem;">Metric retention</h2>
|
||||
<p style="font-size:0.82rem;color:var(--text-muted);margin-bottom:1.25rem;">
|
||||
Bounds how much host-agent metric history is stored (CPU, memory, disk, network,
|
||||
temps, …). Raw per-sample points are kept for the raw window, then rolled up
|
||||
into hourly averages kept for the rollup window. Host charts read raw for the
|
||||
recent part of a range and hourly for older data. Applied by the hourly cleanup.
|
||||
Bounds how much metric history is stored: hosts (CPU, memory, disk, network,
|
||||
temps, …), containers (CPU and memory), monitors and the other sources. Raw
|
||||
per-sample points are kept for the raw window, then rolled up into hourly
|
||||
figures (average, peak, and the level held) kept for the rollup window. Charts
|
||||
read raw for the recent part of a range and hourly for older data. Applied by
|
||||
the hourly cleanup.
|
||||
</p>
|
||||
|
||||
{{ days("Raw metrics", "metrics_raw_days", "metrics.retention.raw_days",
|
||||
"Keep per-sample host metrics this long, then roll up to hourly averages.") }}
|
||||
"Keep per-sample metrics this long, then roll up to hourly.") }}
|
||||
{{ days("Rolled-up metrics", "metrics_rollup_days", "metrics.retention.rollup_days",
|
||||
"Keep the hourly-averaged series this long for multi-week history.") }}
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user