Skip to content

fix(inputs.zfs): Parse metrics correctly on FreeBSD 14#14176

Merged
powersj merged 1 commit intoinfluxdata:masterfrom
srebhan:zfs_issue_14151
Oct 25, 2023
Merged

fix(inputs.zfs): Parse metrics correctly on FreeBSD 14#14176
powersj merged 1 commit intoinfluxdata:masterfrom
srebhan:zfs_issue_14151

Conversation

@srebhan
Copy link
Copy Markdown
Member

@srebhan srebhan commented Oct 24, 2023

resolves #14151
resolves #11089

This PR handles newer versions of FreeBSD (i.e. 14+) correctly where the vdev_cache_stats metric is no longer available and zfs outputs - signs instead of numbers when run with -p. Anyway, the PR makes the parsing more robust by treating dashes as zero values and by monitoring the success of sysctl calls. If the later is not successful, a warning is issued and the metric is removed from the set of collectable metrics.

@telegraf-tiger telegraf-tiger bot added fix pr to fix corresponding bug plugin/input 1. Request for new input plugins 2. Issues/PRs that are related to input plugins labels Oct 24, 2023
@telegraf-tiger
Copy link
Copy Markdown
Contributor

@powersj powersj merged commit 57eb716 into influxdata:master Oct 25, 2023
@github-actions github-actions bot added this to the v1.28.4 milestone Oct 25, 2023
powersj pushed a commit that referenced this pull request Nov 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

fix pr to fix corresponding bug plugin/input 1. Request for new input plugins 2. Issues/PRs that are related to input plugins

Projects

None yet

Development

Successfully merging this pull request may close these issues.

zfs API changes from FreeBSD RELENG_13 to RELENG_14 zfs parsing error

2 participants