Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ncabatoff/zfs-exporter
Prometheus metrics exporter for ZFS
https://github.com/ncabatoff/zfs-exporter
prometheus-exporter zfs
Last synced: about 2 months ago
JSON representation
Prometheus metrics exporter for ZFS
- Host: GitHub
- URL: https://github.com/ncabatoff/zfs-exporter
- Owner: ncabatoff
- License: mit
- Created: 2016-07-16T20:40:21.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2017-07-01T23:29:31.000Z (over 7 years ago)
- Last Synced: 2024-10-15T13:29:59.850Z (about 2 months ago)
- Topics: prometheus-exporter, zfs
- Language: Go
- Size: 212 KB
- Stars: 52
- Watchers: 7
- Forks: 8
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# 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](https://grafana.net/dashboards/328).
## 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](https://github.com/ncabatoff/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.
https://github.com/prometheus/node_exporter/pull/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.## Testing
To build and run zfs-exporter in a virtual environment, you need to install
VirtualBox, Vagrant, and Ansible 2.2+. Then```
platform=jessie # or fedora25
sudo ansible-galaxy install gantsign.golang
cd zfs-vagrant-ansible/
vagrant up $platform
cd ..
ANSIBLE_HOST_KEY_CHECKING=False ansible-playbook -i zfs-vagrant-ansible/.vagrant/provisioners/ansible/inventory/vagrant_ansible_inventory playbook-zfs-exporter.yml -l $platform
```