Grafana

Making ZFS ARC Grafana Panels FreeBSD-Compatible

Making ZFS ARC Grafana Panels FreeBSD-Compatible

These are the steps I took to make an imported ZFS/Grafana dashboard work correctly on FreeBSD. The panels assumed Linux exporters and referenced metrics that do not exist on FreeBSD. The result was a dashboard full of empty panels. This walkthrough shows how I identified the missing ARC kstats, exported them cleanly, and refactored the panels to reflect the real FreeBSD kernel state.

Host: clemente (10.10.0.1)
Stack: FreeBSD + node_exporter (textfile collector) + Prometheus + Grafana
Date: 2026-02-10


Overview (Context & Goal)

grafana ZFS FreeBSD.

FreeBSD ZFS Grafana Panel.

 …

Monitoring ZFS with Grafana

Date: 2026-02-08
Host: grafana
Component: Prometheus + Grafana + exporters +zfs
Scope: ZFS monitoring

ZFS / Zpool Metrics for Prometheus (node-exporter + textfile collector on FreeBSD)

This guide sets up zpool capacity metrics (zpool list) for Prometheus/Grafana using node-exporter’s textfile collector on FreeBSD.

This complements (not replaces) zfs_exporter, which provides ARC/internal ZFS metrics but not pool capacity.


What I Got Working

Metrics exposed to Prometheus:

  • zpool_size_bytes{pool="zroot"}
  • zpool_alloc_bytes{pool="zroot"}
  • zpool_free_bytes{pool="zroot"}
  • zpool_capacity_ratio{pool="zroot"}

These map directly to:

 …

Fixing doas: not installed setuid on macOS (MacPorts)

Date: 2026-02-08
Host: macOS (MacPorts prefix: /opt/local)
Component: doas (MacPorts)

My WireGuard client app failed to load profiles because the code path relies on doas for privilege escalation. This fix corrects the macOS (MacPorts) doas installation so the client can elevate properly.

doas: not installed setuid

…and exiting with status 1.


Root Cause

On macOS, MacPorts installs doas without the setuid bit by default.

Because doas is not setuid-root, it cannot elevate privileges. I depend on doas and rarely use sudo, so any command that relies on it fails immediately, including:

 …

Fixing a grafana instance on macOS

Date: 2026-02-08
Host: server (macOS Monterey; Homebrew prefix: /usr/local)
Grafana install: Homebrew (/usr/local/opt/grafana)
Grafana data: /usr/local/var/lib/grafana

Grafana (Homebrew on macOS Monterey) & Password Reset + Boot-Time Startup (No GUI Login)


Summary of the fix

  1. The admin password did not work, even after reset attempts.
  2. Grafana ran manually, but it did not run reliably as a user service through brew services. The service needed to start at boot without a desktop login.
  3. We fixed both problems:
  • Reset the password against the actual Brew paths and database that the running server uses.
  • Replace the GUI-bound LaunchAgent approach with a system LaunchDaemon at /Library/LaunchDaemons/... that runs at boot as your user.

Caveats

The password reset reported success but used the wrong database

You can point Grafana at different data directories. In this setup, the running Brew Grafana server uses:

 …