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 prometheus passthrough for existing value types #3351

Merged
merged 2 commits into from
Oct 18, 2017

Conversation

danielnelson
Copy link
Contributor

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.ContinueOnError option 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.ValueType types and then they can be wired up like counters/gauges.

closes #2950

Required for all PRs:

  • Signed CLA.
  • Associated README.md updated.
  • Has appropriate unit tests.

@jdoupe
Copy link
Contributor

jdoupe commented Oct 18, 2017

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

@danielnelson
Copy link
Contributor Author

I'll merge this and then can you rebase and open a pull request?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Type loss and metric rename in prometheus input → prometheus output
2 participants