{"record":{"id":"872e89bc19ca9d80","repo":"prometheus/node_exporter","slug":"collector-filesystem-mount-points-exclude-and","errorCode":null,"errorMessage":"--collector.filesystem.mount-points-exclude and --collector.filesystem.mount-points-include are mutually exclusive","messagePattern":"--collector\\.filesystem\\.mount-points-exclude and --collector\\.filesystem\\.mount-points-include are mutually exclusive","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"collector/filesystem_common.go","lineNumber":259,"sourceCode":"}\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}\n\n\treturn newDeviceFilter(*mountPointsExclude, *mountPointsInclude), nil\n}\n\nfunc newFSTypeFilter(logger *slog.Logger) (deviceFilter, error) {\n\tif *oldFSTypesExcluded != \"\" {\n\t\tif !fsTypesExcludeSet {\n\t\t\tlogger.Warn(\"--collector.filesystem.ignored-fs-types is DEPRECATED and will be removed in 2.0.0, use --collector.filesystem.fs-types-exclude\")\n\t\t\t*fsTypesExclude = *oldFSTypesExcluded\n\t\t} else {","sourceCodeStart":241,"sourceCodeEnd":277,"githubUrl":"https://github.com/prometheus/node_exporter/blob/17ddd77c59ba27e1508e9f7894b1e55b44d6aed3/collector/filesystem_common.go#L241-L277","documentation":"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.","triggerScenarios":"Thrown at collector/filesystem_common.go:259 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["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.","If migrating off the deprecated flag, copy the regex from ignored-mount-points into mount-points-exclude and delete the old flag.","Keep the deprecated flag alone if mount-points-exclude is genuinely not set; the error only fires when both are provided."],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"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"}