prometheus/node_exporter · error
Could not derive a human-readable chip type for
Error message
Could not derive a human-readable chip type for
What it means
The hwmon collector scans /sys/class/hwmon directories and tries to derive a human-readable chip name (e.g. "coretemp", "acpitz") from the device's name file and sysname. When every fallback fails — the chip has no readable `name` attribute, or the name/sysname clean up to an empty string — it cannot label metrics and returns this error for the offending hwmon directory. This aborts the whole hwmon scrape (updateHwmon propagates it), so one malformed sysfs entry can fail the entire collector.
Solutions
- Inspect the reported directory: `cat <dir>/name` and `ls <dir>` — if the name file is missing/empty, that kernel driver or virtual device is at fault.
- Run the exporter with `--collector.hwmon` disabled (or use `--collector.netdev`-style include/exclude if available) if the chip is from a virtual/hypervisor device you don't need.
- Update the kernel/driver: a driver that registers hwmon without a name is a kernel bug; check dmesg and kernel changelogs.
- If the device is legitimate, fix the sysfs entry via driver configuration (e.g. correct ACPI/DT table) so the name attribute is populated.
- As a last resort, patch/fallback locally: have updateHwmon skip directories that fail name derivation instead of failing the whole scrape.
Example fix
// before (collector behavior: whole Update fails)
if err := updateHwmon(dir, ...); err != nil { return err }
// after (skip undecorable chips instead of failing the scrape)
if _, err := hwmonHumanReadableChipName(dir); err != nil {
logger.Debug("skipping hwmon dir with no chip name", "dir", dir)
return nil
} Defensive patterns
Strategy: fallback
Validate before calling
// Before running the hwmon collector, verify each hwmon dir has a usable name
import "os"
import "path/filepath"
func hwmonDirHasName(sysClass string) error {
dirs, _ := filepath.Glob(filepath.Join(sysClass, "hwmon*"))
for _, d := range dirs {
real, err := filepath.EvalSymlinks(d)
if err != nil { continue }
b, err := os.ReadFile(filepath.Join(real, "name"))
if err != nil || len(bytes.TrimSpace(b)) == 0 {
return fmt.Errorf("hwmon dir %s has no usable name attribute", real)
}
}
return nil
} Try / catch
err := collector.Update(ch)
if err != nil && strings.Contains(err.Error(), "Could not derive a human-readable chip type") {
logger.Warn("hwmon scrape skipped: chip name missing in sysfs", "err", err)
return // degrade to no hwmon metrics instead of failing the scrape
} Prevention
- Pre-scan /sys/class/hwmon/*/name at startup and alert on empty/missing name files.
- Pin known-good kernel versions for exotic/virtualized hardware.
- Prefer disabling hwmon on VMs/containers where virtual hwmon devices are unreliable.
- Monitor node_scrape_collector_success{collector="hwmon"} to detect degraded scrapes early.
When it happens
Trigger: updateHwmon calls hwmonHumanReadableChipName for a /sys/class/hwmon/hwmonN directory where: (1) the `name` file is missing or unreadable, (2) the name/sysname contains only characters stripped by cleanMetricName (e.g. all punctuation/spaces), yielding cleanName == "", or (3) sysnameRaw is empty. The error message ends with the directory path, e.g. `Could not derive a human-readable chip type for /sys/devices/virtual/thermal/...`.
Common situations: Virtualized or containerized environments exposing odd/empty hwmon entries; buggy or exotic drivers that register a hwmon device without a `name` attribute; kernel/driver upgrades that change sysfs layout; test fixtures or bind-mounted /sys trees missing the name file.
Related errors
- interrupts empty
- failed to open sysfs
- failed to retrieve bcache stats
- failed to open sysfs
- failed to retrieve bcachefs stats
AI-assisted analysis of prometheus/node_exporter@17ddd77c59 (2026-09-07).
Data as JSON: /api/errors/ec9d5345c844869e.
Report an issue: GitHub.
Appendix: source
Thrown at collector/hwmon_linux.go:432
return "", errors.New("Could not derive a monitoring name for " + dir)
}
// hwmonHumanReadableChipName is similar to the methods in hwmonName, but with
// different precedences -- we can allow duplicates here.
func (c *hwMonCollector) hwmonHumanReadableChipName(dir string) (string, error) {
sysnameRaw, nameErr := os.ReadFile(filepath.Join(dir, "name"))
if nameErr != nil {
return "", nameErr
}
if string(sysnameRaw) != "" {
cleanName := cleanMetricName(string(sysnameRaw))
if cleanName != "" {
return cleanName, nil
}
}
return "", errors.New("Could not derive a human-readable chip type for " + dir)
}
func (c *hwMonCollector) Update(ch chan<- prometheus.Metric) error {
// Step 1: scan /sys/class/hwmon, resolve all symlinks and call
// updateHwmon for each folder.
hwmonPathName := filepath.Join(sysFilePath("class"), "hwmon")
hwmonFiles, err := os.ReadDir(hwmonPathName)
if err != nil {
if errors.Is(err, os.ErrNotExist) {
c.logger.Debug("hwmon collector metrics are not available for this system")
return ErrNoData
}
return err
}
View on GitHub (pinned to 17ddd77c59)