←   BACK TO INDEPENDENT PROJECTS

INDEPENDENT PROJECT / OBSERVABILITY

See the pressure.
Verify the change.

Host and container metrics that help turn a failing workload into a capacity decision.

ROLEImplementation · Troubleshooting · Operations
TOOLINGForgejo · Ansible · Telegraf · InfluxDB · Grafana
CONTEXTIndependent project · Virtual infrastructure

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.

Three representative Telegraf collectors on anonymous hosts feed a shared InfluxDB store. Grafana provides fleet and individual-host views from the stored measurements.
Historical measurements provide context around an incident. Host metrics show overall pressure; container metrics help narrow the investigation.

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

Full Grafana fleet overview with All hosts selected. Multiple host and container series are visible in CPU, memory, disk, and network charts. Host and container names are replaced with neutral aliases.Open full-size screenshot
The all-host dashboard view. This dashboard can be filtered to view individual host metrics. The names have been changed to protect the innocent

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

Forgejo Actions job panel showing successful validation and a successful deploy-canary job. Steps include creating the Ansible environment, configuring deployment SSH, deploying and verifying the selected canary, and removing deployment SSH material. The deploy-fleet job is skipped.Open full-size screenshot
The selected canary completed deployment and verification through Ansible. Validation also passed. The fleet job was skipped in this run; this capture demonstrates the canary path.

04 / A REAL INCIDENT

A restart was not enough.

01

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.

02

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.

03

Increase capacity

On September 9, 2026, I increased the allocation to 8 GB.

04

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

Original Grafana Memory Usage panel with the identifying legend replaced by Host A. The graph peaks at 92.8 percent, drops sharply around September 9, and later shows 27.0 percent.Open full-size screenshot
The memory utilization drop around September 9 aligns with the increase to 8 GB. The later capture shows ~25% usage. Additional RAM changes the percentage denominator.

A separate disk utilization change

Original Grafana Disk Usage panel with the legend replaced by Host A and filesystem. Utilization peaks at 84.4 percent, falls to roughly 56 percent around September 11, and ends at 58.4 percent.Open full-size screenshot
Disk utilization fell from ~85% to ~55% around September 11. This happened after giving the VM a little more breathing room by allocating more storage for it's boot drive

05 / THE EVIDENCE

More headroom, with a clear explanation.

Confirmed troubleshooting observations; host and workload identities omitted.
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.

KEEP EXPLORING

From publishing to operating.