{"record":{"id":"58656ba8101c67dd","repo":"prometheus/node_exporter","slug":"could-not-parse-expected-signed-integer-value-for","errorCode":null,"errorMessage":"could not parse expected signed integer value for %q: %w","messagePattern":"could not parse expected signed integer value for %q: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"collector/zfs_linux.go","lineNumber":244,"sourceCode":"\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 {\n\tscanner := bufio.NewScanner(reader)\n\n\tparseLine := false\n\tvar fields []string\n\tfor scanner.Scan() {\n\t\tline := strings.Fields(scanner.Text())","sourceCodeStart":226,"sourceCodeEnd":262,"githubUrl":"https://github.com/prometheus/node_exporter/blob/17ddd77c59ba27e1508e9f7894b1e55b44d6aed3/collector/zfs_linux.go#L226-L262","documentation":"parseProcfsFile hit a kstat line declared int64 whose value strconv.ParseInt rejected. The ZFS kstat file contains a column typed as signed integer that is not a valid base-10 integer — malformed or unexpected kstat format.","triggerScenarios":"Thrown at collector/zfs_linux.go:244 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Inspect the kstat file under /proc/spl/kstat/zfs/ to locate the malformed value.","Update node_exporter if a newer ZFS changed the kstat encoding.","Skip or report the affected kstat file if it is persistently 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"}