Skip to content

rdegez/zfs-exporter

 
 

Repository files navigation

zfs-exporter

Prometheus metrics exporter for ZFS.

It's much the same data you get from zpool status and zpool iostat, but in the form of Prometheus metrics. Run

curl -s http://localhost:9254/metrics

to see them.

Sample dashboard is available at grafana.net.

Caveats

Currently doesn't handle pool changes gracefully, you'll have to kill and restart it if you create/import or destroy/export any pools.

libzfs is not a stable or official interface, so this could break with any new ZFS release.

Requires root privileges on Linux. For the security conscious, run it with -web.listen-address=localhost:9254.

If you're not running prometheus on the same host, either use my exporter-proxy or write a little cronjob that does

curl -s http://localhost:9254/metrics > mydir/zfs.tmp && mv mydir/zfs.tmp mydir/zfs.prom

Configure node_exporter with -collector.textfile.directory=mydir and it will publish the stats to allow remote scraping.

See also

https://github.com/eliothedeman/zfs_exporter

Same idea, but implemented by parsing the output of zpool using github.com/mistifyio/go-zfs.

https://github.com/eripa/prometheus-zfs

Ditto but without the dependency on go-zfs.

prometheus/node_exporter#213

PR for node_exporter to add support for ZFS metrics. Currently also relies on shelling out, which is apparently not allowed in node_exporter, so not clear where it's going.

About

Prometheus metrics exporter for ZFS

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Go 100.0%