{{define "content"}}
{{with .Data}} {{$e := .Errors}}{{$f := .Form}}

The router's state

The web UI serves the router's own state for Prometheus at https://{{.Host}}/metrics: the uplink and its pings, pending changes, DHCP leases, WireGuard peers and the certificate's expiry. It needs a token (any access) from the API access page; nothing is switched on here.

scrape_configs:
  - job_name: router
    scheme: https
    tls_config:
      insecure_skip_verify: true   # or ca_file, if the certificate is not self-signed
    authorization:
      credentials: rtr_…
    static_configs:
      - targets: ['{{.Host}}']
The machine (node_exporter) {{with index $e "port"}}

{{.}}

{{end}}

Open to these zones (the port is closed to every other zone and to the internet):

{{range .Zones}} {{else}}

There is no zone yet: add a LAN or a tunnel first.

{{end}} {{with index $e "zones"}}

{{.}}

{{end}}

With no zone chosen, node_exporter runs but only the router itself can read it. It listens on every address; the firewall is what keeps others out. Saving does not change the router: apply the settings afterwards.

{{if $f.Enabled}}

Scrape it

  - job_name: router-node
    static_configs:
      - targets: ['{{.Target}}']
{{end}} {{end}}
{{end}}