{"record":{"id":"503f35e2dc7819a4","repo":"prometheus/node_exporter","slug":"collector-filesystem-ignored-mount-points-and","errorCode":null,"errorMessage":"--collector.filesystem.ignored-mount-points and --collector.filesystem.mount-points-exclude are mutually exclusive","messagePattern":"--collector\\.filesystem\\.ignored-mount-points and --collector\\.filesystem\\.mount-points-exclude are mutually exclusive","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"collector/filesystem_common.go","lineNumber":249,"sourceCode":"\t\t\t1.0, s.labels.device, s.labels.major, s.labels.minor, s.labels.mountPoint,\n\t\t)\n\t\tif s.purgeable >= 0 {\n\t\t\tch <- prometheus.MustNewConstMetric(\n\t\t\t\tc.purgeableDesc, prometheus.GaugeValue,\n\t\t\t\ts.purgeable, s.labels.device, s.labels.mountPoint, s.labels.fsType, s.labels.deviceError,\n\t\t\t)\n\t\t}\n\t}\n\treturn nil\n}\n\nfunc newMountPointsFilter(logger *slog.Logger) (deviceFilter, error) {\n\tif *oldMountPointsExcluded != \"\" {\n\t\tif !mountPointsExcludeSet {\n\t\t\tlogger.Warn(\"--collector.filesystem.ignored-mount-points is DEPRECATED and will be removed in 2.0.0, use --collector.filesystem.mount-points-exclude\")\n\t\t\t*mountPointsExclude = *oldMountPointsExcluded\n\t\t} else {\n\t\t\treturn deviceFilter{}, errors.New(\"--collector.filesystem.ignored-mount-points and --collector.filesystem.mount-points-exclude are mutually exclusive\")\n\t\t}\n\t}\n\n\tif *mountPointsInclude != \"\" && !mountPointsExcludeSet {\n\t\tlogger.Debug(\"mount-points-exclude flag not set when mount-points-include flag is set, assuming include is desired\")\n\t\t*mountPointsExclude = \"\"\n\t}\n\n\tif *mountPointsExclude != \"\" && *mountPointsInclude != \"\" {\n\t\treturn deviceFilter{}, errors.New(\"--collector.filesystem.mount-points-exclude and --collector.filesystem.mount-points-include are mutually exclusive\")\n\t}\n\n\tif *mountPointsExclude != \"\" {\n\t\tlogger.Info(\"Parsed flag --collector.filesystem.mount-points-exclude\", \"flag\", *mountPointsExclude)\n\t}\n\tif *mountPointsInclude != \"\" {\n\t\tlogger.Info(\"Parsed flag --collector.filesystem.mount-points-include\", \"flag\", *mountPointsInclude)\n\t}","sourceCodeStart":231,"sourceCodeEnd":267,"githubUrl":"https://github.com/prometheus/node_exporter/blob/17ddd77c59ba27e1508e9f7894b1e55b44d6aed3/collector/filesystem_common.go#L231-L267","documentation":"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.","triggerScenarios":"--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.","commonSituations":"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.","solutions":["Remove --collector.filesystem.ignored-mount-points and express the same regex in --collector.filesystem.mount-points-exclude","If you keep the deprecated flag, do not pass --collector.filesystem.mount-points-exclude at all","Grep your deployment manifests/unit files for both flags and consolidate to the new one"],"exampleFix":"// before\nnode_exporter --collector.filesystem.ignored-mount-points='^/(dev|proc)($|/)' --collector.filesystem.mount-points-exclude='^/run($|/)'\n// after\nnode_exporter --collector.filesystem.mount-points-exclude='^/(dev|proc|run)($|/)'","handlingStrategy":"validation","validationCode":"# pre-flight: only the new flag may be present\nif echo \"$NODE_EXPORTER_ARGS\" | grep -q 'ignored-mount-points=' && echo \"$NODE_EXPORTER_ARGS\" | grep -q 'mount-points-exclude='; then\n  echo \"conflict: drop --collector.filesystem.ignored-mount-points and use --collector.filesystem.mount-points-exclude\"\nfi","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Migrate every --collector.filesystem.ignored-mount-points value into --collector.filesystem.mount-points-exclude","Add config-management lint that forbids the deprecated flag","Consolidate flag rendering into one template to prevent layered conflicts","Run an exporter startup check in CI before rollout"],"tags":["cli-flags","configuration","filesystem","deprecated-flag"],"backgroundTag":"mutually-exclusive-flags","analyzedSha":"17ddd77c59ba27e1508e9f7894b1e55b44d6aed3","analyzedAt":"2026-09-07T17:54:06.211Z","contentChangedAt":"2026-09-07T17:54:06.211Z","schemaVersion":2},"datasetVersion":"2026-09-16T04:17:20.429Z"}