Skip to content

Conversation

@srebhan
Copy link
Member

@srebhan srebhan commented Nov 6, 2025

Summary

Setting the kstatMetrics option explicitly to an empty string (i.e. kstatMetrics = [""]) prevents the default collection of those metrics (as the list is not empty) which might be desirable in some cases. However, the current code uses the entries literally for filenames and will panic.

This PR handles empty entries, i.e. explicitly disabling kstat metrics, correctly and moves code to an Init function to improve readability.

Checklist

Related issues

resolves #17952

@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 Nov 6, 2025
@telegraf-tiger
Copy link
Contributor

telegraf-tiger bot commented Nov 6, 2025

@mstrandboge mstrandboge removed their assignment Nov 7, 2025
@mstrandboge mstrandboge added the ready for final review This pull request has been reviewed and/or tested by multiple users and is ready for a final review. label Nov 7, 2025
Copy link
Contributor

@skartikey skartikey left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@srebhan Clean fix using Init() to properly validate and filter empty kstatMetrics, preventing the panic while maintaining backward compatibility.

@skartikey skartikey merged commit 4f04046 into influxdata:master Nov 7, 2025
26 of 27 checks passed
@github-actions github-actions bot added this to the v1.36.4 milestone Nov 7, 2025
srebhan added a commit that referenced this pull request Nov 17, 2025
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 ready for final review This pull request has been reviewed and/or tested by multiple users and is ready for a final review.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Panic in inputs.zfs after upgrading to 1.36.3-1

3 participants