Fix prometheus passthrough for existing value types#3351
Merged
danielnelson merged 2 commits intomasterfrom Oct 18, 2017
Merged
Fix prometheus passthrough for existing value types#3351danielnelson merged 2 commits intomasterfrom
danielnelson merged 2 commits intomasterfrom
Conversation
Merged
Contributor
|
Here's an ugly patch (not that ugly, but probably needs some cleanup) that is built on top of #3351 and adds history and summary types. https://github.com/influxdata/telegraf/compare/master...jdoupe:add-history-and-summary-types?expand=1 |
Contributor
Author
|
I'll merge this and then can you rebase and open a pull request? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is an alternative pull request to #3337, I added the setting of metric types in the prometheus input, and use that in the prometheus output to adjust the output format. I think this will have less potential for side effects.
I also included @jdoupe suggestion to use the promhttp package, as well as adding his configurable disabling of the built in collectors. It would be nicer to disable them by default, since outputs shouldn't really create metrics, but for now they default on.
I added the
ErrorHandling: promhttp.ContinueOnErroroption which seems to prevents conflict if the help message is different. This will reduce the visibility of errors, but it seems it may be necessary. In the long term I would like to add metadata support to our metrics struct, so that help info can be passed through this way, but this requires more consideration.Unlike #3337, I did not add histogram or summary support, these types need to be added as first class
telegraf.ValueTypetypes and then they can be wired up like counters/gauges.closes #2950
Required for all PRs:
Associated README.md updated.