mirror of
https://github.com/henrygd/beszel.git
synced 2026-09-21 08:57:48 +02:00
feat: add ZFS monitoring (#2209)
- track pool capacity, health, I/O, scrub status, and vdev errors - report dataset usage and correct ZFS filesystem metrics - add pool charts, detail views, refresh controls, and health alerts - persist pool details and include ZFS usage in disk alerts - support configurable detail intervals and legacy agent compatibility --------- Co-authored-by: hank <hank@henrygd.me>
This commit is contained in:
@@ -3,9 +3,17 @@
|
||||
package zfs
|
||||
|
||||
import (
|
||||
"errors"
|
||||
|
||||
"golang.org/x/sys/unix"
|
||||
)
|
||||
|
||||
func ARCSize() (uint64, error) {
|
||||
return unix.SysctlUint64("kstat.zfs.misc.arcstats.size")
|
||||
}
|
||||
|
||||
// FreeBSD does not expose Linux's per-pool procfs kstats. Capacity, health,
|
||||
// and detail collection still work through the cached utilities.
|
||||
func PoolKernelStats() ([]PoolKernelStat, error) {
|
||||
return nil, errors.ErrUnsupported
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user