{"record":{"id":"ea04cc8fcfb797b6","repo":"prometheus/node_exporter","slug":"failed-to-retrieve-station-info-for-device-q-v","errorCode":null,"errorMessage":"failed to retrieve station info for device %q: %v","messagePattern":"failed to retrieve station info for device %q: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"collector/wifi_linux.go","lineNumber":214,"sourceCode":"\t\tcase err == nil:\n\t\t\tc.updateBSSStats(ch, ifi.Name, bss)\n\t\tcase errors.Is(err, os.ErrNotExist):\n\t\t\tc.logger.Debug(\"BSS information not found for wifi device\", \"name\", ifi.Name)\n\t\tdefault:\n\t\t\treturn fmt.Errorf(\"failed to retrieve BSS for device %s: %v\",\n\t\t\t\tifi.Name, err)\n\t\t}\n\n\t\tstations, err := stat.StationInfo(ifi)\n\t\tswitch {\n\t\tcase err == nil:\n\t\t\tfor _, station := range stations {\n\t\t\t\tc.updateStationStats(ch, ifi.Name, station)\n\t\t\t}\n\t\tcase errors.Is(err, os.ErrNotExist):\n\t\t\tc.logger.Debug(\"station information not found for wifi device\", \"name\", ifi.Name)\n\t\tdefault:\n\t\t\treturn fmt.Errorf(\"failed to retrieve station info for device %q: %v\",\n\t\t\t\tifi.Name, err)\n\t\t}\n\t}\n\n\treturn nil\n}\n\nfunc (c *wifiCollector) updateBSSStats(ch chan<- prometheus.Metric, device string, bss *wifi.BSS) {\n\t// Synthetic metric which provides wifi station info, such as SSID, BSSID, etc.\n\tch <- prometheus.MustNewConstMetric(\n\t\twifiStationInfo,\n\t\tprometheus.GaugeValue,\n\t\t1,\n\t\tdevice,\n\t\tbss.BSSID.String(),\n\t\tbss.SSID,\n\t\tbssStatusMode(bss.Status),\n\t)","sourceCodeStart":196,"sourceCodeEnd":232,"githubUrl":"https://github.com/prometheus/node_exporter/blob/17ddd77c59ba27e1508e9f7894b1e55b44d6aed3/collector/wifi_linux.go#L196-L232","documentation":"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).","triggerScenarios":"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.","commonSituations":"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.","solutions":["Check the named device with 'iw dev <name> station dump'; if the driver errors there, update or reload the driver/firmware.","If the interface legitimately has no station info (AP/monitor mode), consider disabling the wifi collector (--collector.wifi=false) or excluding the device.","Grant node_exporter the needed capabilities (CAP_NET_ADMIN) and confirm the wrapped error is not EPERM.","Retry the scrape; transient netlink errors can occur while interfaces change state.","Upgrade node_exporter and its wifi dependency for kernel-compat fixes."],"exampleFix":null,"handlingStrategy":"retry","validationCode":"// Check the device exposes station info before expecting metrics\nout, err := exec.Command(\"iw\", \"dev\", ifname, \"station\", \"dump\").Output()\nif err != nil {\n    // no station info for this interface type; don't expect node_wifi_station metrics\n}","typeGuard":"// Go: only retry transient netlink failures\ncase errors.Is(err, os.ErrNotExist):\n    // benign: interface has no station info\ncase isTransientNetlink(err): // e.g. syscall.EAGAIN/EINTR\n    // retry\ndefault:\n    // driver-level failure, do not retry blindly\n}","tryCatchPattern":"err := coll.Update(ch)\nif err != nil && strings.Contains(err.Error(), \"failed to retrieve station info\") {\n    time.Sleep(500 * time.Millisecond)\n    err = coll.Update(ch) // transient netlink errors often clear on retry\n}\nif err != nil { log.Warn(\"station info unavailable\", \"err\", err) }","preventionTips":["Run exporter builds recent enough to handle current kernel/driver netlink responses","Use CAP_NET_ADMIN for the exporter","Exclude AP/monitor-mode devices from wifi metric expectations","Alert on absent node_wifi_station series rather than failing the scrape"],"tags":["linux","netlink","wifi","collector"],"backgroundTag":"network-request-failed","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"}