prometheus/node_exporter · info · errZFSNotAvailable

ZFS / ZFS statistics are not available

Error message

ZFS / ZFS statistics are not available

What it means

errZFSNotAvailable signals that the ZFS /proc stat files (e.g., /proc/spl/kstat/zfs) do not exist, so ZFS statistics cannot be collected. Update translates it into ErrNoData so exporters report no data rather than failing collection — ZFS proc files appear as new ZFS features land.

Solutions

  1. Nothing to fix if ZFS is intentionally absent — the collector logs a debug message and skips; no error is surfaced.
  2. If ZFS is expected, verify /proc/spl/kstat/zfs exists and the zfs kernel module is loaded (modprobe zfs).
  3. In containers, mount /proc/spl/kstat/zfs into the container for the exporter.
  4. Upgrade ZFS on Linux if specific subsystem proc files are missing.
Defensive patterns

Strategy: fallback

Validate before calling

if _, err := os.Stat("/proc/spl/kstat/zfs"); os.IsNotExist(err) {
    logger.Info("ZFS not present; disable --collector.zfs")
}

Try / catch

err := collector.Update(ch)
if errors.Is(err, ErrNoData) {
    logger.Debug("no data for zfs collector")
    return // not fatal
}

Prevention

When it happens

Trigger: zfsCollector.Update or openProcFile fails to open the ZFS proc path, or updatePoolStats finds a subsystem proc file missing — typically when ZFS is not installed/loaded on Linux.

Common situations: node_exporter running on Linux hosts without ZFS modules loaded; containers without /proc/spl/kstat/zfs mounted; kernels with ZFS built without the kstat proc entries.

Understand the failure class

Background: 'Could not be found', 'does not exist', 'not found in database': the resource-not-found family when an ID, slug, key, or URI lookup comes back empty — this error's family across 20 libraries.

Related errors


AI-assisted analysis of prometheus/node_exporter@17ddd77c59 (2026-09-07). Data as JSON: /api/errors/c21b9809398d3a18. Report an issue: GitHub.

Appendix: source

Thrown at collector/zfs_linux.go:46

	"github.com/prometheus/client_golang/prometheus"
)

// constants from https://github.com/zfsonlinux/zfs/blob/master/lib/libspl/include/sys/kstat.h
// kept as strings for comparison thus avoiding conversion to int
const (
	// kstatDataChar   = "0"
	// kstatDataInt32  = "1"
	// kstatDataUint32 = "2"
	kstatDataInt64  = "3"
	kstatDataUint64 = "4"
	// kstatDataLong   = "5"
	// kstatDataUlong  = "6"
	// kstatDataString = "7"
)

var (
	errZFSNotAvailable = errors.New("ZFS / ZFS statistics are not available")

	zfsPoolStatesName = [...]string{"online", "degraded", "faulted", "offline", "removed", "unavail", "suspended"}
)

type zfsCollector struct {
	linuxProcpathBase    string
	linuxZpoolIoPath     string
	linuxZpoolObjsetPath string
	linuxZpoolStatePath  string
	linuxPathMap         map[string]string
	logger               *slog.Logger
}

// NewZFSCollector returns a new Collector exposing ZFS statistics.
func NewZFSCollector(logger *slog.Logger) (Collector, error) {
	return &zfsCollector{
		linuxProcpathBase:    "spl/kstat/zfs",
		linuxZpoolIoPath:     "/*/io",

View on GitHub (pinned to 17ddd77c59)