-
Notifications
You must be signed in to change notification settings - Fork 3
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
Cleanup Exporter a bit #22
Conversation
hey @dmke, thanks for all your contributions. I'm going to get to them this weekend hopefully. |
In #23, it looks like I've got some units wrong, let me fix that real quick :) |
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.
the cleanup bits look nice, the new behaviour is a bit confusing to me
0dc2bf7
to
2bc5d73
Compare
I believe this PR is now ready for the next review round. |
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.
hmm, your changes are still confusing.
so the switch is now called wan_metrics
but it disables metrics collection for all interfaces? that doesn't make sense to me
let's try to break this PR up. |
Fair enough. That will take a moment, though. |
Done. |
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.
just one small thing
exporter/exporter.go
Outdated
var ( | ||
defaultWithInterfaces = true | ||
) | ||
var defaultWithInterfaces = true |
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.
mind moving this to device.go
?
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.
Will do.
please consider doing a merge instead of a rebase (github even has a button for it) |
Oh, sorry, force of habit :) |
- move unwieldy prom.MustNewConstMetric into a helper func - move fetching UNMS data into a helper func - reduce unnecessay allocation in intoDesc - make API tokens configurable via environment - run `go mod tidy`
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.
sorry, i keep finding things 🙈
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.
thank you. these are great!
This makes some minor adjustments:
intoDesc
.The last item is useful when running the Docker container: Instead of mounting a file and adding a CLI flag, one can just manage the environment: