Skip to content

Metrics and Alerts

You'll graph what every box in the lab is doing minute by minute, set alerts for the three things that actually take a lab down, and catch one before it does.

About

The uptime board tells you a thing is down. Metrics tell you why, and often tell you a day early. A disk at 95 percent, a Pi throttling at 80 degrees, a container leaking memory: all three show up on a graph long before anyone notices. Prometheus with node exporter and Grafana is the standard stack and runs fine on a Pi, and Netdata is the one-command route. The craft is in the alerts. Too few and you miss the disk, too many and you mute the channel, and three good alerts beat thirty bad ones.

At a glance

Per requirement
35 XP
Completion bonus
300 XP
Requirements
5
Takes
One weekend, then a month
Skill level
Intermediate (months of practice)
Cost
Free
Supplies
You need some
Where
At home
Other people
On your own
Locked for now
Earn two more Uncommon badges in Homelab & Hardware to open this one. Log in to see how far along you are.

Requirements

  1. 1
    Run a metrics collector on every box and get them all on one dashboard. Node exporter on each machine with Prometheus and Grafana on the monitoring box, or Netdata with a parent collecting from its children. Keep it on the box that isn't the one you're watching. Take a screenshot of the dashboard with every host on it. Photo
  2. 2
    Add disk, container and temperature panels. Disk use per mount, memory per container from cAdvisor or the Docker metrics, CPU temperature on every host, and the throttling flag if a Pi is in the mix. Take a screenshot of a panel with temperature and disk use for each host. Photo
  3. 3
    Write three alerts: a disk nearly full, a box too hot, and a service that stopped answering. Reasonable lines are 90 percent on the disk, 75 degrees on a Pi, and two minutes of no response. Send them to your phone through the same channel as the uptime board, so there's one place to look. Take a screenshot of the three rules. Photo
  4. 4
    Trigger each alert on purpose. Fill a disk with fallocate, run a stress test for ten minutes, and stop a container. Film one of the alerts arriving on your phone, with the other two visible in the alert history. Video
  5. 5
    After a month, silence what was noise and show the one real problem the graphs found. Say which alert fired for nothing and what you changed about it. Then show the thing you'd have missed without the graphs: a disk filling slowly, a fan dying, a container restarting every night. Take a screenshot of the graph with the problem on it and tell us what you did about it. Photo