Your browser sucks, JavaScript disabled! Gunnar's console needs JavaScript and WebAssembly. Git over SSH on port 2222 does not.

nordisk/holger

.nornir/metrics-for-idiots.md

Prometheus /metrics — for idiots

Class: guide (beginner) · Function: metrics. The five-minute version. The real reference is metrics-guide.md.

The problem

Your Holger server is running. Is it busy? How many downloads? Any errors? How many artifacts are in each repo? You don't want to guess — you want a dashboard.

The fix

Holger speaks Prometheus, the standard "numbers about a server" format. Open one URL and you get all the numbers:

curl http://your-holger:PORT/metrics

You'll see lines like this:

holger_requests_total{verb="get"} 1284
holger_requests_total{verb="put"} 57
holger_requests_total{verb="promote"} 9
holger_bytes_served_total 90173441
holger_errors_total 0
holger_proxy_requests_total{result="primary_hit"} 903
holger_proxy_requests_total{result="miss"} 12
holger_repo_artifacts{repo="rust-dev"} 128

Read it as plain English:

Hook it to a dashboard

Prometheus (the monitoring tool) scrapes that URL every few seconds and draws graphs. Tell it where Holger is:

scrape_configs:
  - job_name: holger
    metrics_path: /metrics
    static_configs:
      - targets: ["your-holger:PORT"]

Then Grafana can graph requests-per-second, error rate, bytes served, and how each repo grows over time.

Three things to remember

  1. It's read-only — looking at the numbers never changes anything.
  2. The counters reset when Holger restarts (that's normal — Prometheus knows).
  3. It's not behind a password (just like /healthz) — if you don't want the world seeing your numbers, keep the port private.