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: handle non integer values for zone serial #97

Merged
merged 3 commits into from
Mar 12, 2021

Conversation

lleifermann
Copy link
Contributor

Fixes Issue #96

Changes zone type from uint64 to string and checks if the unmarshalled string really is of an value, which can be parsed back to an int. If not set it as 0. (Don't really know if its a good idea to do this implicitly, but this error should not occur in the first place.)

Also tried to extend the test to cover this case of bind reporting a '-' in a zone serial

Signed-off-by: Lauritz Leifermann <lleifermann@lcoord.net>
@lleifermann
Copy link
Contributor Author

@SuperQ could u take a look at this?

bind_exporter.go Outdated Show resolved Hide resolved
Copy link
Contributor

@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.

One minor issue, otherwise looks good.

Signed-off-by: Lauritz Leifermann <lleifermann@lcoord.net>
Signed-off-by: Lauritz Leifermann <lleifermann@lcoord.net>
Copy link
Contributor

@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 27afaff into prometheus-community:master Mar 12, 2021
@theonlydoo
Copy link

has this fix been released on a tagged version yet?

roosemberth added a commit to roosemberth/dotfiles that referenced this pull request Jan 11, 2022
I need this: prometheus-community/bind_exporter#97

Signed-off-by: Roosembert Palacios <roosemberth@posteo.ch>
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