prometheus/node_exporter · error
disabled collector
Error message
disabled collector: %s
What it means
node_exporter returns this when a collector name passed via the --collector.disable/--collector.enable (or per-collector enabled/disabled) filters refers to a collector that exists but is currently turned off. NewNodeCollector validates every filter name against collectorState and refuses to build a collector set containing a disabled collector, so a scrape configuration never silently runs a collector the operator excluded.
Solutions
- Remove the collector name from the enabled/disabled filter list, or enable it with its --collector.<name> flag
- Check `node_exporter --help` (or the README collector table) to confirm the collector is enabled by default on this platform
- If the collector is build-tag gated, use a binary built for the target OS
Example fix
// before innerHandler(filters incl. "arp" while --collector.arp=false) // after start exporter with --collector.arp (or drop "arp" from the filter list)
Defensive patterns
Strategy: validation
Validate before calling
// Go: check collector state before requesting it
if enabled, ok := collectorState[name]; !ok {
return fmt.Errorf("missing collector: %s", name)
} else if !*enabled {
return fmt.Errorf("collector %s is disabled; add --collector.%s", name, name)
} Try / catch
if err := startExporter(filters); err != nil {
if strings.HasPrefix(err.Error(), "disabled collector:") {
log.Warn("collector disabled, retrying without it", "collector", err)
filters = removeFilter(filters, extractName(err))
return startExporter(filters)
}
return err
} Prevention
- Check `node_exporter --help` for default-enabled collectors before adding filters
- Only pass --collector.enable/--collector.disable names that appear in the README collector table
- On multi-OS deployments, gate collector lists per platform
When it happens
Trigger: Calling NewNodeCollector with a filter list that names a collector registered with enabled=false (e.g. the binary was built/started with that collector disabled, or it is gated behind a build tag so its state is disabled on this OS).
Common situations: Operators pass --collector.<name> for a collector they earlier disabled with --collector.disable-defaults or a disable flag; running a Linux-gated collector name on another OS where it is registered as disabled; typos are reported differently ('missing collector'), so this specifically means a real but disabled name.
Related errors
- device-exclude & device-include are mutually exclusive
- missing collector
- collector returned no data
- --collector.diskstats.ignored-devices and…
- device-exclude & device-include are mutually exclusive
AI-assisted analysis of prometheus/node_exporter@17ddd77c59 (2026-09-07).
Data as JSON: /api/errors/4baf095d30fd13bc.
Report an issue: GitHub.
Appendix: source
Thrown at collector/collector.go:114
// does not contain information about which flag called the action.
// See: https://github.com/alecthomas/kingpin/issues/294
func collectorFlagAction(collector string) func(ctx *kingpin.ParseContext) error {
return func(_ *kingpin.ParseContext) error {
forcedCollectors[collector] = true
return nil
}
}
// NewNodeCollector creates a new NodeCollector.
func NewNodeCollector(logger *slog.Logger, filters ...string) (*NodeCollector, error) {
f := make(map[string]bool)
for _, filter := range filters {
enabled, exist := collectorState[filter]
if !exist {
return nil, fmt.Errorf("missing collector: %s", filter)
}
if !*enabled {
return nil, fmt.Errorf("disabled collector: %s", filter)
}
f[filter] = true
}
collectors := make(map[string]Collector)
initiatedCollectorsMtx.Lock()
defer initiatedCollectorsMtx.Unlock()
for key, enabled := range collectorState {
if !*enabled || (len(f) > 0 && !f[key]) {
continue
}
if collector, ok := initiatedCollectors[key]; ok {
collectors[key] = collector
} else {
collector, err := factories[key](logger.With("collector", key))
if err != nil {
return nil, err
}
collectors[key] = collectorView on GitHub (pinned to 17ddd77c59)