prometheus/node_exporter · error
failed to retrieve XFS stats
Error message
failed to retrieve XFS stats: %w
What it means
Update failed because the xfs procfs/sysfs client could not read XFS runtime stats (typically /proc/fs/xfs/stat). A missing file (XFS not loaded or not mounted) or parse failure aborts the XFS scrape for the cycle.
Solutions
- Check `cat /proc/fs/xfs/stat` exists — if not, XFS support is not loaded and the xfs collector should be disabled.
- Ensure the exporter can read the file (permissions/LSM).
- Retry if the failure was transient (e.g. during module load).
Defensive patterns
Strategy: retry
When it happens
Trigger: Thrown at collector/xfs_linux.go:53 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of prometheus/node_exporter@17ddd77c59 (2026-09-07).
Data as JSON: /api/errors/a8a5b41eef49af80.
Report an issue: GitHub.
Appendix: source
Thrown at collector/xfs_linux.go:53
// NewXFSCollector returns a new Collector exposing XFS statistics.
func NewXFSCollector(logger *slog.Logger) (Collector, error) {
fs, err := xfs.NewFS(*procPath, *sysPath)
if err != nil {
return nil, fmt.Errorf("failed to open sysfs: %w", err)
}
return &xfsCollector{
fs: fs,
logger: logger,
}, nil
}
// Update implements Collector.
func (c *xfsCollector) Update(ch chan<- prometheus.Metric) error {
stats, err := c.fs.SysStats()
if err != nil {
return fmt.Errorf("failed to retrieve XFS stats: %w", err)
}
for _, s := range stats {
c.updateXFSStats(ch, s)
}
return nil
}
// updateXFSStats collects statistics for a single XFS filesystem.
func (c *xfsCollector) updateXFSStats(ch chan<- prometheus.Metric, s *xfs.Stats) {
const (
subsystem = "xfs"
)
var (
labels = []string{"device"}
)View on GitHub (pinned to 17ddd77c59)