{"record":{"id":"bf81763cdd02083d","repo":"prometheus/node_exporter","slug":"could-not-parse-expected-unsigned-integer-value-fo","errorCode":null,"errorMessage":"could not parse expected unsigned integer value for %q: %w","messagePattern":"could not parse expected unsigned integer value for %q: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"collector/zfs_linux.go","lineNumber":238,"sourceCode":"\n\t\tif !parseLine && len(parts) == 3 && parts[0] == \"name\" && parts[1] == \"type\" && parts[2] == \"data\" {\n\t\t\t// Start parsing from here.\n\t\t\tparseLine = true\n\t\t\tcontinue\n\t\t}\n\n\t\tif !parseLine || len(parts) < 3 {\n\t\t\tcontinue\n\t\t}\n\n\t\t// kstat data type (column 2) should be KSTAT_DATA_UINT64, otherwise ignore\n\t\t// TODO: when other KSTAT_DATA_* types arrive, much of this will need to be restructured\n\t\tkey := fmt.Sprintf(\"kstat.zfs.misc.%s.%s\", fmtExt, parts[0])\n\t\tswitch parts[1] {\n\t\tcase kstatDataUint64:\n\t\t\tvalue, err := strconv.ParseUint(parts[2], 10, 64)\n\t\t\tif err != nil {\n\t\t\t\treturn fmt.Errorf(\"could not parse expected unsigned integer value for %q: %w\", key, err)\n\t\t\t}\n\t\t\thandler(zfsSysctl(key), value)\n\t\tcase kstatDataInt64:\n\t\t\tvalue, err := strconv.ParseInt(parts[2], 10, 64)\n\t\t\tif err != nil {\n\t\t\t\treturn fmt.Errorf(\"could not parse expected signed integer value for %q: %w\", key, err)\n\t\t\t}\n\t\t\thandler(zfsSysctl(key), value)\n\t\t}\n\t}\n\tif !parseLine {\n\t\treturn fmt.Errorf(\"did not parse a single %q metric\", fmtExt)\n\t}\n\n\treturn scanner.Err()\n}\n\nfunc (c *zfsCollector) parsePoolProcfsFile(reader io.Reader, zpoolPath string, handler func(string, zfsSysctl, uint64)) error {","sourceCodeStart":220,"sourceCodeEnd":256,"githubUrl":"https://github.com/prometheus/node_exporter/blob/17ddd77c59ba27e1508e9f7894b1e55b44d6aed3/collector/zfs_linux.go#L220-L256","documentation":"parseProcfsFile hit a kstat line in /proc/spl/kstat/zfs/... whose data column was declared uint64 but strconv.ParseUint rejected the value. The ZFS kstat file contains data that is not a valid base-10 unsigned integer — malformed or newer-format kstat output.","triggerScenarios":"Thrown at collector/zfs_linux.go:238 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Inspect the offending kstat file under /proc/spl/kstat/zfs/ to find the non-numeric value.","Upgrade node_exporter/procfs handling if a newer ZFS emits a new data type or format.","Report the ZFS version; consider skipping that kstat file via collector configuration if unparseable."],"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"}