prometheus/node_exporter · error

failed to parse mountstats

Error message

failed to parse mountstats: %w

What it means

Update failed while procfs parsed /proc/self/mountstats. This is NFS collector data collection, not a startup problem; a malformed or truncated mountstats file (or a procfs version mismatch) makes the whole mountstats scrape fail for this cycle.

Solutions

  1. Inspect /proc/self/mountstats on the host for unexpected content or very long lines.
  2. Update node_exporter/vendor procfs if the kernel emits newer mountstats fields the parser rejects.
  3. Re-run the scrape; transient parse errors during mount/unmount churn usually clear on the next scrape.
Defensive patterns

Strategy: retry

When it happens

Trigger: Thrown at collector/mountstats_linux.go:531 when the library encounters an invalid state.

Common situations: See trigger scenarios.

Understand the failure class


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

Appendix: source

Thrown at collector/mountstats_linux.go:531

			nil,
		),

		NFSEventPNFSWriteTotal: prometheus.NewDesc(
			prometheus.BuildFQName(namespace, subsystem, "event_pnfs_write_total"),
			"Number of NFS v4.1+ pNFS writes.",
			labels,
			nil,
		),

		proc:   proc,
		logger: logger,
	}, nil
}

func (c *mountStatsCollector) Update(ch chan<- prometheus.Metric) error {
	mounts, err := c.proc.MountStats()
	if err != nil {
		return fmt.Errorf("failed to parse mountstats: %w", err)
	}

	mountsInfo, err := c.proc.MountInfo()
	if err != nil {
		return fmt.Errorf("failed to parse mountinfo: %w", err)
	}

	// store all seen nfsDeviceIdentifiers for deduplication
	deviceList := make(map[nfsDeviceIdentifier]bool)
	mountpointList := make(map[nfsMountpointIdentifier]bool)

	for idx, m := range mounts {
		// For the time being, only NFS statistics are available via this mechanism
		stats, ok := m.Stats.(*procfs.MountStatsNFS)

		if !ok {
			continue
		}

View on GitHub (pinned to 17ddd77c59)