-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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): Skip brw_stats in case of insufficient permissions #15045
feat(inputs.lustre2): Skip brw_stats in case of insufficient permissions #15045
Conversation
df4f9b6
to
bed31ce
Compare
@lukeyeager thanks for your contribution. It would be nice if you can resolve the merge conflict... |
91b91f5
to
73e6be0
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One more comment regarding error checking... It might be necessary to import errors
if that's not done already...
Before this commit, the plugin entirely fails when run as anyone other than root, because brw_stats files are symlinks to /sys/kernel/debug/. Which was causing errors like this: ``` 2024-03-22T02:40:40Z E! [inputs.lustre2] Error in plugin: failed to read file /proc/fs/lustre/osd-ldiskfs/MGS/brw_stats: open /proc/fs/lustre/osd-ldiskfs/MGS/brw_stats: permission denied ``` After this change, the plugin continues to run and gather whatever metrics it can, even if brw_stats files are unreadable.
73e6be0
to
4b5a0ad
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks a lot @lukeyeager!
Download PR build artifacts for linux_amd64.tar.gz, darwin_arm64.tar.gz, and windows_amd64.zip. 👍 This pull request doesn't change the Telegraf binary size 📦 Click here to get additional PR build artifactsArtifact URLs |
Before this commit, the plugin entirely fails when run as anyone other than root, because brw_stats files are symlinks to /sys/kernel/debug/:
Which was causing errors like this:
After this change, the plugin continues to run and gather whatever metrics it can, even if brw_stats files are unreadable.
I'll rebase after #15042 is merged.