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

Fix for mountstats error due to multiline "impl_id" on FreeNAS #339

Merged
merged 2 commits into from
Dec 14, 2020

Conversation

JakubWes
Copy link
Contributor

This PR fixes the issue described in prometheus/node_exporter#1583

When reading from /proc/self/mountstats for FreeNAS NFS mount, the data in "impl_id" tends to be printed in 3 lines. As seen in the above issue, the second and third line are one field long. This results in parser exiting with "not enough information for NFS stats" error.
The PR moves the length check so that node-exporter won't crash when trying to export NFS client metrics connected to the FreeNAS server.

@discordianfish @pgier

This commit fixes an error happening when trying to parse data from FreeNAS NFS
mount point. "impl_id" is printed in multiple lines, which triggers "not enough
information for NFS stats" error.

Signed-off-by: Jakub Wesolowski <jakubwesolowski@posteo.net>
@discordianfish
Copy link
Member

Can you create a new test case with the (obfuscated) content of /proc/self/mountstats you see?

Signed-off-by: Jakub Wesolowski <jakubwesolowski@posteo.net>
@JakubWes
Copy link
Contributor Author

Sure.

Copy link
Member

@discordianfish discordianfish left a comment

Choose a reason for hiding this comment

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

Thanks!

Copy link
Member

@SuperQ SuperQ left a comment

Choose a reason for hiding this comment

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

LGTM

@SuperQ SuperQ merged commit 7b52fa5 into prometheus:master Dec 14, 2020
remijouannet pushed a commit to remijouannet/procfs that referenced this pull request Oct 20, 2022
…theus#339)

* Fix for mountstats error due to multiline "impl_id" on FreeNAS
This commit fixes an error happening when trying to parse data from FreeNAS NFS
mount point. "impl_id" is printed in multiple lines, which triggers "not enough
information for NFS stats" error.

Signed-off-by: Jakub Wesolowski <jakubwesolowski@posteo.net>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants