Tag: prometheus tutorial for homeowners

  • Prometheus tutorial for homeowners: Monitor Your Whole Homelab: Prometheus and Grafana, End to End

    Prometheus tutorial for homeowners: Monitor Your Whole Homelab: Prometheus and Grafana, End to End

    This guide covers prometheus tutorial for homeowners.

    Prometheus tutorial for homeowners: Monitor Your Whole Homelab: Prometheus and G
    Photo: Heinrich Kirchner, CC BY-SA 3.0, via Wikimedia Commons

    A homelab without monitoring is a homelab that finds out about problems from a user complaining — or from a service that has been down for three days. Monitoring is not a luxury add-on for a home server rack; it is the difference between knowing and guessing. The stack below is the one the industry itself runs on, it is free and open source, and it fits on a single small machine: Prometheus collects the numbers, Grafana turns them into pictures, and Alertmanager makes sure a problem reaches your phone instead of sitting in a log file nobody reads.

    The shape of the stack

    Three pieces, one flow. Prometheus is the collector and the database. It works on a pull model: every fifteen seconds by default, it asks each machine and service for its current numbers over HTTP, and stores the answers as time series. Exporters are the small programs that answer those questions — Node Exporter runs on each Linux host and exposes CPU, memory, disk and network counters. Grafana is the face: it queries Prometheus and draws dashboards, and it is where you will actually spend your time. Alertmanager is the pager: Prometheus fires an alert when a rule trips, Alertmanager dampens, groups and routes it somewhere you will see it.

    Nothing here phones home, nothing here needs a cloud account, and the whole stack runs on your own hardware. That is the point: the thing watching your homelab should not depend on the homelab being healthy to tell you it is not.

    Step one: Prometheus, in ten minutes

    Prometheus ships as a single binary. Download the latest release for your platform from the project’s own site, extract it, and write one configuration file, prometheus.yml. The project’s own getting-started guide uses this shape:

    global:
      scrape_interval: 15s
    scrape_configs:
      - job_name: 'prometheus'
        static_configs:
          - targets: ['localhost:9090']

    Start it with ./prometheus --config.file=prometheus.yml and it is running on port 9090, storing its database in a local data directory. Browse to localhost:9090 and you get the expression browser, where you can query any metric Prometheus has collected. One of its own metrics, prometheus_target_interval_length_seconds, tells you how long scrapes are actually taking — the system watches itself from the first minute. Configuration can be reloaded without a restart by sending the process a SIGHUP, and a clean shutdown is a SIGTERM or SIGINT. Keep the binary on a machine that stays up; a collector that sleeps when the power blips is a gap in your history, not a feature.

    Step two: exporters on every host

    A Prometheus that only scrapes itself is a demo. The real work is Node Exporter on every machine you own — the NAS, the Proxmox host, the Raspberry Pi, the media server. Each one exposes its host’s counters on a /metrics endpoint, and Prometheus is told about them with one more job in the same file:

    scrape_configs:
      - job_name: 'node'
        static_configs:
          - targets: ['nas:9100', 'proxmox:9100', 'pi:9100']

    The project’s getting-started guide demonstrates the same pattern with three local targets, grouped with labels — group="production" on two, group="canary" on the third — so queries can slice by group. Check the Targets page at localhost:9090/targets: every endpoint should read UP, and a DOWN endpoint means that exporter is not running, not that Prometheus is broken. The metric names are plain: node_cpu_seconds_total is the per-CPU counter the guide uses to teach queries, and rate() over a five-minute window turns those counters into the per-second CPU usage your dashboards will show. Recording rules let you precompute the expensive queries — the guide’s example records the average CPU rate per instance into a new series — so dashboards stay fast as the host count grows.

    Step three: Grafana, the dashboard

    Install Grafana from its own packages, start the grafana-server service, and open port 3000. The default login is admin/admin, and the installer asks you to change it on first use — do that before anything else; a monitoring dashboard with a default password is a map of your network handed to whoever finds it. Add Prometheus as a data source with the URL of your Prometheus server, http://localhost:9090, then build your first dashboard: CPU and memory per host, disk free space, network throughput, and one panel per service you care about. The Grafana dashboard library has community dashboards for Node Exporter that you can import and adapt instead of drawing every panel by hand.

    Two habits make the dashboard worth keeping. First, one dashboard per question, not one dashboard per host — “is the NAS healthy?” beats a wall of graphs. Second, set the retention and the scrape interval deliberately: fifteen seconds is fine for a homelab, and a year of fifteen-second samples per host is a lot of disk. Prometheus keeps what you tell it to keep; decide that number on purpose.

    Prometheus tutorial for homeowners: Monitor Your Whole Homelab: Prometheus and G
    Photo: Heinrich Kirchner, CC BY-SA 3.0, via Wikimedia Commons

    Step four: alerts that actually reach you

    A dashboard nobody looks at is a screensaver. The last piece is the alert, and it has three parts. Prometheus evaluates rules — a disk over 85% full for ten minutes, a host down for two minutes, a service’s error rate climbing — and fires them to Alertmanager. Alertmanager groups duplicate alerts, waits out the flapping, and routes the result to a channel you actually check: email, a webhook, or a lightweight push service like ntfy, which takes a single HTTP POST and pushes it to your phone. The homelab pattern that works is one alert per failure mode, with a threshold loose enough that it never fires on a normal Tuesday, and a route that is tested — send yourself a test alert the day you set it up, because an alerting path you have never seen fire is a path you cannot trust.

    The security half: keep the watcher private

    Monitoring sees everything: which services run, when they restart, how full the disks are, which hosts exist. That makes the monitoring stack itself a target, and the defaults are not safe to expose. Never put Grafana or Prometheus on the public internet without authentication in front of it — the Grafana login is the only thing between the internet and a live map of your network, and the default admin/admin password is the first thing any scanner tries. The right shape is the one the homelab community uses: reach Grafana over your own VPN or tailnet, keep Prometheus listening only on the LAN, and treat the monitoring host like the router — patched, backed up, and never directly reachable from outside. Alertmanager’s outbound notifications are the only thing that needs to leave the house, and they leave through a webhook, not an open port.

    The bottom line

    End-to-end homelab monitoring is four moves: Prometheus scraping exporters every fifteen seconds, Node Exporter on every host, Grafana on port 3000 turning the numbers into dashboards, and Alertmanager paging you when a rule trips. The whole stack is free, it runs on hardware you already own, and the first version takes an evening — Prometheus and one exporter in ten minutes, Grafana and a dashboard in the next hour, one real alert before bed. After that, your homelab stops being a set of machines you hope are fine and becomes a set of machines you know are fine, with the receipts to prove it.

    By Karl Amber

    Sources

    • Prometheus — Getting Started (prometheus.io/docs/prometheus/latest/getting_started): the pull model (scraping HTTP metrics endpoints); the default 15-second scrape interval; prometheus.yml configuration shape; ./prometheus --config.file=prometheus.yml; the built-in expression browser at localhost:9090; Node Exporter as the example target; the node job with labeled target groups; the Targets page and UP/DOWN states; node_cpu_seconds_total and rate() queries; recording rules; SIGHUP reload and SIGTERM/SIGINT shutdown; local ./data storage.
    • Grafana Labs — Grafana documentation and community forums (grafana.com/docs, community.grafana.com): installing Grafana and starting grafana-server; the default admin/admin login and the first-use password change; adding Prometheus as a data source at http://localhost:9090; the public dashboard library for Node Exporter dashboards.
    • Prometheus — exporters list (prometheus.io/docs/instrumenting/exporters) and Alertmanager documentation (prometheus.io/docs/alerting/latest/alertmanager): the exporter model and Alertmanager’s grouping, dampening and routing of alerts.

    Editor’s note: this article is part of ScanderLoud’s Cybersecurity & Networking series. It was researched from the projects’ own documentation — our coverage is original.

    Versión en español: https://scanderloud.com/2026/11/18/monitor-your-whole-homelab-prometheus-and-grafana-end-to-end-es/

    That is the complete picture on prometheus tutorial for homeowners.

    Featured image: Heinrich Kirchner, CC BY-SA 3.0, via Wikimedia Commons