Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(inputs.lustre2): Add eviction_count field #15044

Merged
merged 2 commits into from
Mar 25, 2024

Conversation

lukeyeager
Copy link
Contributor

Adds support for https://review.whamcloud.com/c/fs/lustre-release/+/40528.

I'll rebase after #15042 is merged.

NOTE: according to https://wiki.lustre.org/Lustre_Monitoring_and_Statistics_Guide#Reading_/proc_vs_lctl it is technically safer to use lctl get_param *.*.eviction_count than parsing files in sysfs/procfs. In this MR I am simply following the existing convention for the plugin. Perhaps in the future we should switch to using lctl get_param for maximum portability. Tests would require mocking the exec.Command output, as is done for other plugins.

@telegraf-tiger telegraf-tiger bot added feat Improvement on an existing feature such as adding a new setting/mode to an existing plugin plugin/input 1. Request for new input plugins 2. Issues/PRs that are related to input plugins labels Mar 22, 2024
@lukeyeager lukeyeager force-pushed the lustre2-eviction-count branch from 1a1ddfd to c06b74d Compare March 22, 2024 16:17
Copy link
Contributor

@powersj powersj left a comment

Choose a reason for hiding this comment

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

Thanks!

@powersj
Copy link
Contributor

powersj commented Mar 22, 2024

Ah I missed the lint issues:

plugins/inputs/lustre2/lustre2.go:604:65       revive    empty-lines: extra empty line at the end of a block
plugins/inputs/lustre2/lustre2.go:687:3        revive    early-return: if c { ... } else { ... return } can be simplified to if !c { ... return } ...
plugins/inputs/lustre2/lustre2_test.go:593:31  gocritic  filepathJoin: "sys/fs/lustre" contains a path separator

@telegraf-tiger
Copy link
Contributor

@powersj powersj 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 Mar 22, 2024
@srebhan srebhan changed the title feat(inputs.lustre2): add eviction_count feat(inputs.lustre2): Add eviction_count field Mar 25, 2024
@srebhan srebhan merged commit c7466b8 into influxdata:master Mar 25, 2024
27 checks passed
@github-actions github-actions bot added this to the v1.31.0 milestone Mar 25, 2024
@lukeyeager lukeyeager deleted the lustre2-eviction-count branch March 25, 2024 13:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feat Improvement on an existing feature such as adding a new setting/mode to an existing plugin 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.

4 participants