Self-Hosting·8 min read·

Monitoring Every Self-Hosted Service at a Glance

Aggregate all your self-hosted services into one Grafana overview with Prometheus scraping, alerts, and a status page you can actually trust.

NB

Netbay Cloud Team

Netbay Engineering

On this page

A self-hosted stack silently degrades in ways you only notice when something is already broken: a disk filling, memory creeping toward swap, a container restarting every few minutes. Monitoring turns those invisible trends into a single dashboard and, better, into alerts that fire before the outage. The standard trio — Prometheus collects metrics, Grafana visualizes them, and alert rules page someone when something strays — fits neatly onto one host and gives you the two things every operator wants: a glanceable overview and a useful alarm.

One pane for the whole stack APP 1 /metrics APP 2 PROMETHEUS scrape & store GRAFANA dashboards ALERTS notify you scrape, store, visualize, alert

A Minimal Prometheus Setup

Prometheus pulls metrics from endpoints that expose them in the Prometheus text format. Many self-hosted apps ship a /metrics endpoint, and exporters bridge the rest (node_exporter for host CPU and memory, cAdvisor for container stats). A scrape config tells Prometheus which targets to hit and how often. Painless and reproducible setup is a compose stack with one scrape job per exporter.

yaml
global:
  scrape_interval: 30s
scrape_configs:
  - job_name: node
    static_configs:
      - targets: ["node-exporter:9100"]
  - job_name: cadvisor
    static_configs:
      - targets: ["cadvisor:8080"]

With node-exporter on 9100 and cAdvisor on 8080 scraping the host and its containers, you now have CPU, memory, disk, network, and per-container metrics flowing into one time series store.

Build a Glanceable Dashboard

Grafana connects to Prometheus as a data source and lets you build panels with PromQL queries. A floor plan for a good single-page dashboard: host resource panels at the top, then one row per important service showing its CPU, memory, and whether health checks pass. The point is that a 30-second skim tells you what is normal and what is drifting.

promql
# host memory usage percent over time
100 - (avg by(instance)(node_memory_MemAvailable_bytes) /
         avg by(instance)(node_memory_MemTotal_bytes)) * 100

PromQL reads like line noise until you learn a handful of selectors and functions, but avg, rate, and sum cover most panels you will ever want in a homelab. Start with those and grow.

Alerts That Page Before It Breaks

Dashboards only help when you look at them. Alerts are where monitoring earns its keep. Prometheus rules evaluate a query on a schedule and fire when it stays true for a duration, rolling out the alert when a threshold is crossed long enough to be real — not a blip.

yaml
groups:
  - name: selfhosted
    rules:
      - alert: DiskAlmostFull
        expr: node_filesystem_avail_bytes{mountpoint="/"} /
              node_filesystem_size_bytes{mountpoint="/"} < 0.10
        for: 10m
        annotations:
          summary: "root disk below 10 percent free"

That single rule catches the classic slow disk-fill before it halts your services, and the for: 10m clause prevents false alarms from momentary dips.

A Status Page You Can Share

Beyond internal dashboards, a status page gives household members or collaborators a public "is it up" view. Tools like Uptime Kuma check endpoints on a schedule and render a green/red board, useful for those of us who are "the IT department" for the family. It also does double duty as a poor-man's uptime probe for anything you expose publicly.

Watch Containers, Not Just the Host

Recalling a full host is a blunt instrument; the real signal is usually a single container. cAdvisor exposes per-container CPU, memory, and network counters, and Prometheus scrapes them like any other target. Add a scrape job for it and you can answer the two questions that come up most: which container is climbing toward its memory limit, and which container restarted overnight. Both belong on your dashboard where a glance answers them.

promql
# restarts per container in the last hour
increase(container_restarts_total[1h])

That one query turns container restarts — the classic "it feels flaky" symptom — into a visible number. When a container restarts repeatedly, you stop wondering and start looking at its logs and health config with a concrete lead in hand.

Notify Where You Actually Look

An alert that only lives inside Grafana's web UI helps little when you are not at a desk. Wire the alert channel to something you will act on — email, a Telegram or Slack webhook, or a mobile push. The earliest useful alert is a bell that reaches you, because the whole point of monitoring is that it pages you before your users or your own morning coffee does.

Takeaway

Prometheus for collection, Grafana for one glanceable page, and alert rules for the panic that happens before the outage — that is a complete homelab monitoring story on one box. You can run the whole trio in containers on a Netbay VPS and watch your stack from your phone, with the host itself ready in under a minute at netbayhosts.in.

Keep reading

Follow along on a real VPS

Deploy Linux in under 60 seconds

These guides are written against Ubuntu, Debian, and RHEL-family images — the same ones on NetBay.

Deploy an instance