INDEPENDENT PROJECT / OBSERVABILITY
See the pressure.
Verify the change.
Host and container metrics that help turn a failing workload into a capacity decision.
01 / THE GOAL
Make resource pressure visible.
A service can stop working long before a virtual machine becomes unreachable.
I collect host and container metrics so I can investigate what happened before a failure, compare resource use over time, and check whether a change helped. The dashboards cover CPU, memory, swap, disk usage, and network activity.
The useful output is a decision: which resource needs attention, what evidence supports a change, and what to check afterward.
02 / THE METRICS PATH
Collect once.
Investigate over time.
Each host runs a Telegraf collector. Multiple collectors send host and container measurements to the shared InfluxDB store, and Grafana provides fleet and individual-host views. The nodes below are representative; they do not disclose the fleet inventory.
THE FLEET VIEW
Compare the hosts.
Keep the context.
The all-host dashboard puts CPU, memory, disk, network, and container measurements alongside one another. Individual hosts can be selected for a closer investigation.
The full dashboard with all hosts selected
Open full-size screenshot
03 / CONFIGURATION DELIVERY
One repository owns the fleet configuration.
The Forgejo repository is the source of truth for the Telegraf configuration across the entire fleet. Configuration changes are versioned and reviewed in one place, then delivered through Ansible and Forgejo Actions. A canary deployment provides a way to verify a change on a selected host before wider rollout.
A verified canary deployment
Open full-size screenshot
04 / A REAL INCIDENT
A restart was not enough.
Confirm the failure
A virtual machine with 4 GB of RAM ran out of memory, and the Linux kernel killed a workload. That established a concrete failure alongside the resource measurements.
Check the first change
I increased RAM to 6 GB. Command-line checks with vmstat still showed sustained swapping, so that increase had not provided enough headroom.
Increase capacity
On September 9, 2026, I increased the allocation to 8 GB.
Verify recovery
I also recreated the affected containers and verified that their required mounted storage was accessible. The later dashboard capture showed approximately 27% host memory usage.
THE RECORDED TRENDS
The charts behind the investigation.
These are cropped panels from the original dashboard. Host labels are anonymized; the plotted data, dates, scales, and measurements are unchanged.
Memory usage around the capacity change
Open full-size screenshot
A separate disk utilization change
Open full-size screenshot
05 / THE EVIDENCE
More headroom, with a clear explanation.
| Stage | Observation | Decision or result |
|---|---|---|
| 4 GB allocation | Kernel terminated a workload during memory exhaustion. | Increase available memory. |
| 6 GB allocation | vmstat still showed sustained swapping. | Increase RAM again and verify afterward. |
| 8 GB allocation | About 4.5 GB available; workload about 2.5 GB. | Memory headroom restored in the post-change check. |
| Later dashboard capture | Host memory usage about 27%. | Lower percentage consistent with the increased allocation. |
Read percentages in context
The graph’s sharp memory drop around September 9 aligns with the RAM increase. Increasing total RAM also changes the denominator of memory utilization, so the percentage drop alone does not prove that the workload used fewer bytes. The available-memory check provides additional evidence of headroom.
Keep the disk change separate
The sharp fall in disk utilization around September 11 is explained by the additional storage allocation for the VM's boot drive.
06 / WHAT I LEARNED
Measure the effect of each change.
The first memory increase helped establish that 6 GB was still insufficient for the workload at that time. Checking swapping and available memory after each adjustment gave the capacity decision a firmer basis than restarting containers and waiting for another failure.