Repository navigation
Tags
Tags
netstat: check the scanner result and error (prometheus#868) parseNetstat discards the first Scan result and never calls Err, so a scanner failure is invisible. The loop then returns netStat, nil with whatever was parsed before the failure, and the caller cannot tell a short read from a complete one. The header case is worse than a lost error. After Scan reports false for a too-long token, the next Scan returns true with the bytes already buffered, so headers stays empty while the counter loop runs, and headers[num] panics with index out of range. net_dev.go, net_sockstat.go, net_unix.go and stat.go all end their scan with scanner.Err(); this is the outlier. Signed-off-by: manon <youdie006@users.noreply.github.com> Co-authored-by: manon <youdie006@users.noreply.github.com> Co-authored-by: Ben Kochie <superq@gmail.com>
fix(mdstat): parse (W), (J) and (R) component device flags (prometheu… …s#842) componentDeviceRE only captured ([SF]+), so the WriteMostly, Journal and Replacement fields read from match[3] were always false, and a flag following another one was dropped entirely - for sde1[4](W)(F) the group matched nothing, losing Faulty as well. The kernel prints each flag as its own parenthesis group, so capture a run of them. Signed-off-by: Sueun Cho <sueun.dev@gmail.com>
Fix invalid format strings (prometheus#832) Signed-off-by: HNO3Miracle <xiangao.or@isrc.iscas.ac.cn>
sysfs: add NVMeSubsystemClass for NVMe-oF subsystem parsing (promethe… …us#797) Add NVMeSubsystemClass() method to sysfs.FS that reads /sys/class/nvme-subsystem/ to discover NVMe over Fabrics subsystems. For each subsystem it reads: - NQN, model, serial, I/O policy - Controller paths with state, transport, and address - Namespace block devices (e.g. nvme0n1) for subsystem-to-device mapping The namespace discovery enables precise correlation between NVMe block devices and their parent subsystems, which is needed for workload-aware storage path health alerting. Signed-off-by: Shirly Radco <sradco@redhat.com> Co-authored-by: Cursor <cursoragent@cursor.com>
Add type and name to the DRM parser class (prometheus#672) * feat: add `devName` and `devType` to DRM GPU stats * fix: don't export empty drm card stats * chore: fail the parsing if name & type invalid --------- Signed-off-by: Deezzir <yurii.kondrakov@canonical.com> Co-authored-by: Ben Kochie <superq@gmail.com>
Fix: Use base16 to convert pci sriov_vf_device (prometheus#762) * base16 for sriov vf device Signed-off-by: Jain Johny <jj@asama.ai> * log device location on error Signed-off-by: Jain Johny <jj@asama.ai> * fix test case Signed-off-by: Jain Johny <jj@asama.ai> --------- Signed-off-by: Jain Johny <jj@asama.ai>
meminfo: Fix ZswappedBytes (prometheus#759) Fix assignment of ZswappedBytes parsing. * Add tests. * Migrate `meminfo_test.go` to `cmp` package. Fixes: prometheus#758 Signed-off-by: SuperQ <superq@gmail.com>
feat: expose MD raid component devices (prometheus#674) * Support parse raid type for mdstat Note: rebased on top of master for reformatting Signed-off-by: Singee <git@singee.me> Signed-off-by: Robin H. Johnson <rjohnson@coreweave.com> * support linear type in mdstat Note: rebased on top of master for reformatting Signed-off-by: Singee <git@singee.me> Signed-off-by: Robin H. Johnson <rjohnson@coreweave.com> * change default type to unknown Note: rebased on top of master for reformatting Signed-off-by: Singee <git@singee.me> Signed-off-by: Robin H. Johnson <rjohnson@coreweave.com> * optimize raid type check Signed-off-by: Singee <git@singee.me> * feat: expose MD raid component devices Expose what component devices are part of a MD raid device, as well as the most common flags per-component. This will enable a future node_exporter metric showing which component of a RAID had failed. Signed-off-by: Robin H. Johnson <robbat2@orbis-terrarum.net> Signed-off-by: Robin H. Johnson <rjohnson@coreweave.com> * fix: update mdstat_test for reshaping testcase Signed-off-by: Robin H. Johnson <robbat2@gentoo.org> * doc: lint fix Signed-off-by: Robin H. Johnson <robbat2@gentoo.org> --------- Signed-off-by: Singee <git@singee.me> Signed-off-by: Robin H. Johnson <rjohnson@coreweave.com> Signed-off-by: Robin H. Johnson <robbat2@orbis-terrarum.net> Signed-off-by: Robin H. Johnson <robbat2@gentoo.org> Co-authored-by: Singee <git@singee.me>
add netfilter queue support (prometheus#677) * add netfilter queue support Signed-off-by: Konstantin Kuklin <konstantin.kuklin@gmail.com> * fixed copyright year Signed-off-by: Konstantin Kuklin <konstantin.kuklin@gmail.com> --------- Signed-off-by: Konstantin Kuklin <konstantin.kuklin@gmail.com>
PreviousNext