-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
Prometheus output plugin seems to export metric from the input plugin #2327
Comments
those are not from the prometheus input, they are automatically exported from the prometheus client library. I'm going to close this because it's not an issue. I don't think there is a way to turn those exported metrics off, but if there is then I'd be happy to consider a PR. |
Thanks for the help. I have digged into the code, and it looks like the client register a collector with a bunch of metrics pre-defined. From my understand, this collector is not meant to be remove so I am not sure it is a good a idea to hack into the telegraf plugin to make a parameter out of it. Registration is here : https://github.com/prometheus/client_golang/blob/master/prometheus/registry.go#L53 The idea would be to access the Registry.collectorsByID var and remove the collector but the "MustRegister" call in init() makes me think this collector is required for the client to work. Any opinion maybe? I am not familiar with Prometheus internals... |
Probably best to open an issue in the prometheus client library asking for a publicly-exposed switch to turn those metrics off |
This is addressed by #3337. The go_* and process_* metrics come from the main part of client library (as pointed out above). The http_* metrics come from the deprecated portion of the http listener built into the client library. |
Bug report
Relevant telegraf.conf:
One inuput enabled
One output enabled
System info:
Telegraf v1.2.0 (git: release-1.2 b2c1d98)
Steps to reproduce:
Expected behavior:
To not have those metrics. Maybe there is parameter to not export them, I did not find any.
Actual behavior:
The /metrics contains metric that, I think, comes from the input.prometheus : https://github.com/influxdata/telegraf/blob/master/plugins/inputs/prometheus/README.md
See the go_goroutines for example
Additional info:
telegraf -test looks good however
Regards,
The text was updated successfully, but these errors were encountered: