Add a collector for ZFS, currently focussed on ARC stats.

It is tested on FreeBSD 10.2-RELEASE and Linux (ZFS on Linux 0.6.5.4).

On FreeBSD, Solaris, etc. ZFS metrics are exposed through sysctls.
ZFS on Linux exposes the same metrics through procfs `/proc/spl/...`.

In addition to sysctl metrics, 'computed metrics' are exposed by
the collector, which are based on several sysctl values.
There is some conditional logic involved in computing these metrics
which cannot be easily mapped to PromQL.

Not all 92 ARC sysctls are exposed right now but this can be changed
with one additional LOC each.
This commit is contained in:
Christian Schwarz 2016-02-25 13:55:02 +01:00 committed by Joe Handzik
commit f29f3873ea
10 changed files with 678 additions and 0 deletions

View file

@ -0,0 +1,12 @@
trout size 4294967296 -
trout free 1040117248 -
trout allocated 70144 -
trout capacity 0% -
trout dedupratio 1.00x -
trout fragmentation 0% -
zroot size 118111600640 -
zroot free 3990917120 -
zroot allocated 114120683520 -
zroot capacity 50% -
zroot dedupratio 1.00x -
zroot fragmentation 67% -