Skip to content

zfs API changes from FreeBSD RELENG_13 to RELENG_14 #14151

@mdtancsa

Description

@mdtancsa

Relevant telegraf.conf

[[inputs.zfs]]
poolMetrics = true
datasetMetrics = true
#kstatMetrics = ["arcstats", "zfetchstats", "vdev_cache_stats"]
#kstatMetrics = ["arcstats", "zfetchstats"]
kstatMetrics = ["arcstats", "zfetchstats", "vdev_cache_stats"]

Logs from Telegraf

# telegraf --test --debug --config telegraf.conf.min
2023-10-19T20:20:11Z I! Loading config: telegraf.conf.min
2023-10-19T20:20:11Z I! Starting Telegraf unknown brought to you by InfluxData the makers of InfluxDB
2023-10-19T20:20:11Z I! Available plugins: 240 inputs, 9 aggregators, 29 processors, 24 parsers, 59 outputs, 4 secret-stores
2023-10-19T20:20:11Z I! Loaded inputs: zfs
2023-10-19T20:20:11Z I! Loaded aggregators: 
2023-10-19T20:20:11Z I! Loaded processors: 
2023-10-19T20:20:11Z I! Loaded secretstores: 
2023-10-19T20:20:11Z W! Outputs are not used in testing mode!
2023-10-19T20:20:11Z I! Tags enabled: host=wsus-windows-firewall.sentex.ca
2023-10-19T20:20:11Z D! [agent] Initializing plugins
2023-10-19T20:20:11Z D! [agent] Starting service inputs
2023-10-19T20:20:11Z E! [inputs.zfs] Error in plugin: sysctl error: 
2023-10-19T20:20:11Z D! [agent] Stopping service inputs
2023-10-19T20:20:11Z D! [agent] Input channel closed
2023-10-19T20:20:11Z D! [agent] Stopped Successfully
2023-10-19T20:20:11Z E! [telegraf] Error running agent: input plugins recorded 1 errors

System info

telegraf-1.28 FreeBSD RELENG_14

Docker

No response

Steps to reproduce

1.use inputs.zfs on RELENG_14 with no options
2.
3.
...

Expected behavior

It should give various stats however it fails on a sysctl setting that no longer exists

Actual behavior

Errors out

Additional info

If you remove "vdev_cache_stats" it works. So just have
[[inputs.zfs]]
kstatMetrics = ["arcstats", "zfetchstats"]

Note, issue #11089 is also relevant here as the display format changed too.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugunexpected problem or unintended behavior

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions