prometheus/node_exporter · error

failed to retrieve station info for device

Error message

failed to retrieve station info for device %q: %v

What it means

The collector calls stat.StationInfo(ifi) to get per-station (associated client) statistics via netlink. Errors of type os.ErrNotExist are expected for interface types without station info and are only debug-logged; any other error aborts the entire wifi scrape with this wrapped message including the device name (%q).

Solutions

  1. Check the named device with 'iw dev <name> station dump'; if the driver errors there, update or reload the driver/firmware.
  2. If the interface legitimately has no station info (AP/monitor mode), consider disabling the wifi collector (--collector.wifi=false) or excluding the device.
  3. Grant node_exporter the needed capabilities (CAP_NET_ADMIN) and confirm the wrapped error is not EPERM.
  4. Retry the scrape; transient netlink errors can occur while interfaces change state.
  5. Upgrade node_exporter and its wifi dependency for kernel-compat fixes.
Defensive patterns

Strategy: retry

Validate before calling

// Check the device exposes station info before expecting metrics
out, err := exec.Command("iw", "dev", ifname, "station", "dump").Output()
if err != nil {
    // no station info for this interface type; don't expect node_wifi_station metrics
}

Type guard

// Go: only retry transient netlink failures
case errors.Is(err, os.ErrNotExist):
    // benign: interface has no station info
case isTransientNetlink(err): // e.g. syscall.EAGAIN/EINTR
    // retry
default:
    // driver-level failure, do not retry blindly
}

Try / catch

err := coll.Update(ch)
if err != nil && strings.Contains(err.Error(), "failed to retrieve station info") {
    time.Sleep(500 * time.Millisecond)
    err = coll.Update(ch) // transient netlink errors often clear on retry
}
if err != nil { log.Warn("station info unavailable", "err", err) }

Prevention

When it happens

Trigger: stat.StationInfo(ifi) returns a non-nil, non-os.ErrNotExist error during wifiCollector.Update — typically a netlink failure (NL80211_CMD_GET_STATION) such as EPERM, a driver rejecting the query, or a malformed netlink response.

Common situations: AP/mesh/monitor-mode interfaces where station queries behave unexpectedly and the driver returns errors instead of empty results, node_exporter running without sufficient capabilities, flaky drivers transiently failing netlink requests, kernel/driver version incompatibilities with the wifi library.

Related errors


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

Appendix: source

Thrown at collector/wifi_linux.go:214

		case err == nil:
			c.updateBSSStats(ch, ifi.Name, bss)
		case errors.Is(err, os.ErrNotExist):
			c.logger.Debug("BSS information not found for wifi device", "name", ifi.Name)
		default:
			return fmt.Errorf("failed to retrieve BSS for device %s: %v",
				ifi.Name, err)
		}

		stations, err := stat.StationInfo(ifi)
		switch {
		case err == nil:
			for _, station := range stations {
				c.updateStationStats(ch, ifi.Name, station)
			}
		case errors.Is(err, os.ErrNotExist):
			c.logger.Debug("station information not found for wifi device", "name", ifi.Name)
		default:
			return fmt.Errorf("failed to retrieve station info for device %q: %v",
				ifi.Name, err)
		}
	}

	return nil
}

func (c *wifiCollector) updateBSSStats(ch chan<- prometheus.Metric, device string, bss *wifi.BSS) {
	// Synthetic metric which provides wifi station info, such as SSID, BSSID, etc.
	ch <- prometheus.MustNewConstMetric(
		wifiStationInfo,
		prometheus.GaugeValue,
		1,
		device,
		bss.BSSID.String(),
		bss.SSID,
		bssStatusMode(bss.Status),
	)

View on GitHub (pinned to 17ddd77c59)