Prometheus recognizes four fundamental metric types: Counter, Gauge, Histogram, and Summary. There are sysctls that correspond to at least three of those: kstat.zfs.<POOL>.misc.dmu_tx_assign: histogram kstat.zfs.dmu_tx.dmu_tx_dirty_over_max: counter vfs.zfs.arc.max: gauge By default Prometheus assumes that all metrics are of type Gauge unless the exporter says otherwise. So sysctls that are really counters (like dmu_tx_dirty_over_max) can't properly be queried in Grafana. Presumably the histogram type can't either, but I haven't tried with any of those. The exporter ought to publish the metric type, like this: # HELP sysctl_foo_bar description of foo.bar # TYPE sysctl_foo_bar counter sysctl_foo_bar 12345 I'm not sure how to fix this. It might require adding additional information to sysctl(3) itself.
Does this apply to: - net-mgmt/prometheus1 - net-mgmt/prometheus2 - something else ?
(In reply to Mark Linimon from comment #1) Both of those, I think. It also applies if, as in my case, the Prometheus server is being run somewhere across the network, on a different OS. I'm using Prometheus v 2.17.0 on the server, but AFAIK it applies to all versions.