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

btrfs-progs v5.7 breaks parsing of stats #2

Open
1n5aN1aC opened this issue Jul 20, 2020 · 3 comments
Open

btrfs-progs v5.7 breaks parsing of stats #2

1n5aN1aC opened this issue Jul 20, 2020 · 3 comments

Comments

@1n5aN1aC
Copy link

As title. Upon upgrading to Btrfs Progs v5.7, parsing the results is broken. this is shown in the logfile for telegraf:

Error in plugin: metric parse error: expected field at 32:67: "btrfs,command=usage,type=Multiple_profiles,pool=/mnt/docker value=no"

@1n5aN1aC
Copy link
Author

1n5aN1aC commented Jul 20, 2020

Update: this is caused by an extra line in btrfs fi usage which reads Multiple profiles: no
I believe it's wanting a number, but we're giving it a string "no" and it doesn't like that.

If it looks trivial to do so, I may make a pull request with fixes.

@1n5aN1aC
Copy link
Author

1n5aN1aC commented Jul 20, 2020

Pull Request #3 fixes this issue, at least in my environment.
I attempted to do it in a way that will not break on the old versions either.

@1n5aN1aC
Copy link
Author

1n5aN1aC commented Feb 6, 2021

#4 solves this as well.

However note that BTRFS 5.10 was just released and adds another line to be parsed like 5.7 did, causing it to break it again.

Here's the quick and dirty fix, though really this should be solved in a different way. This is a bit hack-y:

if "statfs" in metric:
                    continue

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

No branches or pull requests

1 participant