prometheus/node_exporter · error

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

Error message

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

What it means

Validation guard in newMountPointsFilter: the collector refuses to start when both the deprecated --collector.filesystem.ignored-mount-points flag and its replacement --collector.filesystem.mount-points-exclude are set, since combining them would give ambiguous filter semantics.

Solutions

  1. Set only --collector.filesystem.mount-points-exclude and remove --collector.filesystem.ignored-mount-points from the command line, service unit, or config that launches node_exporter.
  2. If migrating off the deprecated flag, copy the regex from ignored-mount-points into mount-points-exclude and delete the old flag.
  3. Keep the deprecated flag alone if mount-points-exclude is genuinely not set; the error only fires when both are provided.
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at collector/filesystem_common.go:259 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/872e89bc19ca9d80. Report an issue: GitHub.

Appendix: source

Thrown at collector/filesystem_common.go:259

}

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)
	}

	return newDeviceFilter(*mountPointsExclude, *mountPointsInclude), nil
}

func newFSTypeFilter(logger *slog.Logger) (deviceFilter, error) {
	if *oldFSTypesExcluded != "" {
		if !fsTypesExcludeSet {
			logger.Warn("--collector.filesystem.ignored-fs-types is DEPRECATED and will be removed in 2.0.0, use --collector.filesystem.fs-types-exclude")
			*fsTypesExclude = *oldFSTypesExcluded
		} else {

View on GitHub (pinned to 17ddd77c59)