prometheus/node_exporter · error

--collector.filesystem.ignored-mount-points and…

Error message

--collector.filesystem.ignored-mount-points and --collector.filesystem.mount-points-exclude are mutually exclusive

What it means

In newMountPointsFilter (filesystem_common.go), node_exporter rejects startup when both the deprecated --collector.filesystem.ignored-mount-points and the replacement --collector.filesystem.mount-points-exclude are explicitly set, since their intent would conflict. This validation runs in NewFilesystemCollector, so the process exits with this error before serving metrics.

Solutions

  1. Remove --collector.filesystem.ignored-mount-points and express the same regex in --collector.filesystem.mount-points-exclude
  2. If you keep the deprecated flag, do not pass --collector.filesystem.mount-points-exclude at all
  3. Grep your deployment manifests/unit files for both flags and consolidate to the new one

Example fix

// before
node_exporter --collector.filesystem.ignored-mount-points='^/(dev|proc)($|/)' --collector.filesystem.mount-points-exclude='^/run($|/)'
// after
node_exporter --collector.filesystem.mount-points-exclude='^/(dev|proc|run)($|/)'
Defensive patterns

Strategy: validation

Validate before calling

# pre-flight: only the new flag may be present
if echo "$NODE_EXPORTER_ARGS" | grep -q 'ignored-mount-points=' && echo "$NODE_EXPORTER_ARGS" | grep -q 'mount-points-exclude='; then
  echo "conflict: drop --collector.filesystem.ignored-mount-points and use --collector.filesystem.mount-points-exclude"
fi

Prevention

When it happens

Trigger: --collector.filesystem.ignored-mount-points is non-empty AND --collector.filesystem.mount-points-exclude was explicitly set (mountPointsExcludeSet) — both flags given on the command line at once.

Common situations: Upgrading across the deprecation of ignored-mount-points while old and new flags coexist in service definitions; Helm/Ansible templates rendering both flags from different config layers; copying example flags from mixed-version documentation.

Understand the failure class

Background: "mutually exclusive" flag errors: what "can't supply both nx and xx", "--raw is not compatible with -i" and "cannot be used with" mean, and how to fix them — this error's family across 29 libraries.

Related errors


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

Appendix: source

Thrown at collector/filesystem_common.go:249

			1.0, s.labels.device, s.labels.major, s.labels.minor, s.labels.mountPoint,
		)
		if s.purgeable >= 0 {
			ch <- prometheus.MustNewConstMetric(
				c.purgeableDesc, prometheus.GaugeValue,
				s.purgeable, s.labels.device, s.labels.mountPoint, s.labels.fsType, s.labels.deviceError,
			)
		}
	}
	return nil
}

func newMountPointsFilter(logger *slog.Logger) (deviceFilter, error) {
	if *oldMountPointsExcluded != "" {
		if !mountPointsExcludeSet {
			logger.Warn("--collector.filesystem.ignored-mount-points is DEPRECATED and will be removed in 2.0.0, use --collector.filesystem.mount-points-exclude")
			*mountPointsExclude = *oldMountPointsExcluded
		} else {
			return deviceFilter{}, errors.New("--collector.filesystem.ignored-mount-points and --collector.filesystem.mount-points-exclude are mutually exclusive")
		}
	}

	if *mountPointsInclude != "" && !mountPointsExcludeSet {
		logger.Debug("mount-points-exclude flag not set when mount-points-include flag is set, assuming include is desired")
		*mountPointsExclude = ""
	}

	if *mountPointsExclude != "" && *mountPointsInclude != "" {
		return deviceFilter{}, errors.New("--collector.filesystem.mount-points-exclude and --collector.filesystem.mount-points-include are mutually exclusive")
	}

	if *mountPointsExclude != "" {
		logger.Info("Parsed flag --collector.filesystem.mount-points-exclude", "flag", *mountPointsExclude)
	}
	if *mountPointsInclude != "" {
		logger.Info("Parsed flag --collector.filesystem.mount-points-include", "flag", *mountPointsInclude)
	}

View on GitHub (pinned to 17ddd77c59)