Various improvements and refactoring
Most notable changes in this MR are:
- Change the port to 9200 to avoid a conflict with Node Exporter
- Capture and export objset metrics
- Refactor the code base in general
- Rename the exporter to "Prometheus Exporter For ZFS" so that we can have a nice, unique prefix of "pe4zfs" for all the metrics
- Remove disk metrics; these can be obtained from other exporters like https://github.com/prometheus/procfs or Node Exporter.
- Do not use
/pool_stats
from procfs to get statistics about pools. This interface is gone in newer releases of OpenZFS. - Remove metrics related to TXGs (transaction groups). We'll introduce them back again later when we figure out that right way of exposing information about them.
- Currently exposed metrics are:
- zfs_version
- allocated_bytes
- capacity_ratio
- fragmentation_ratio
- free_bytes
- size_bytes
- read_errors_total
- write_errors_total
- checksum_errors_total
- dmu_tx_dirty_throttle
- dmu_tx_dirty_delay
- dmu_tx_dirty_over_max
- dmu_tx_dirty_frees_delay
- dmu_tx_quota
- dmu_tx_memory_reserve
- dmu_tx_memory_reclaim
- memory_throttle_count
- hits
- misses
- mru_ghost_hits
- mfu_ghost_hits
- writes
- nwritten
- reads
- nread
- nunlinks
- nunlinked
- avail
- used
- refer
- usedsnap
- usedds
- usedrefreserv
- usedchild
- reserv
- quota