influxdata / influxdata/telegraf
[[inputs.zfs]] Add support for zpool status/state on Linux
- Dominant language
- Go
- Stars
- 17.8k
- Forks
- 5.8k
- Avg merge
- 1d 20h
- Merged PRs (30d)
- 161
Description
### Use Case
Currently, the `zfs` input (specifically the `zfs_pool` metric) only has the `status` tag available on FreeBSD. With the current implementation of the `zfs_pool` statistics, you can access the status/health of the ZFS Pool with the `state` file in the pool folder.
As an example, to get the status of the `storage` pool, you'd get the contents of `//state`. Currently, all the current i/o info is fetched from `//iostats`, but this only is done with zfs 2.x. I'm not sure how you would go about adding support to get the pool status on zfs 1.x (since I run zfs 2.1.x on my server).
### Expected behavior
Linux versions of Telegraf don't support providing/exposing the status of a ZFS Pool
### Actual behavior
The status/state of the ZFS Pool is only available on FreeBSD via the `zpool` command.
### Additional info
_No response_
Contributor guide
Research direction
Start by locating the Telegraf zfs input's zfs_pool collection and the existing FreeBSD status handling. Compare the Linux pool files under //state and iostats, including the stated ZFS 1.x and 2.x differences. Done means Linux zfs_pool exposes pool status/state while preserving its existing I/O metrics, with coverage for the supported layouts.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- observability, operating-systems
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100