-
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 #306
Comments
@oldmantaiter So this would be an output plugin that starts up a server with an endpoint for prometheus to query from? Then that server needs to accept flush writes from Telegraf while also accepting requests from prometheus? That definitely sounds like it would be useful, I know @brian-brazil would be interested. I don't think that it's possible, however, with the current |
@sparrc Correct, the current implementation does the following: I will put my current code in my fork, although I am still tweaking it. |
Adds a client implementation using the prometheus go_client library that exposes metrics. Currently only supports Gauge type events. X-Github-Issue: influxdata#306
Adds a client implementation using the prometheus go_client library that exposes metrics. Currently only supports Gauge type events. X-Github-Issue: influxdata#306
I already wrote up the code for this, see master...brian-brazil:prometheus and #15
You should produce untyped metrics at scrape time (untyped as we don't know if they're counters or gauges). This keeps the timestamps correct. |
@brian-brazil This is different because we'd be creating a generic interface for outputs to provide a service, rather than having prometheus being integrated directly into the agent. @oldmantaiter let me know if you need assistance or want me to add some of the generic interface code. My thought was that we could make a generic ServiceOutput interface similar to ServicePlugin: https://github.com/influxdb/telegraf/blob/master/plugins/registry.go#L32-L48 This ServiceOutput would then have it's |
@sparrc I'll take a look. @brian-brazil I had considered supporting counters, but from a really brief glance had not really seen any metrics that would warrant it. If that is not the case, I can look into adding support. |
It's a question of what the plugin produces, for example |
@brian-brazil You are absolutely correct, I was thinking of metrics in terms of how our current in-house implementation (which we are replacing with telegraf) presents them (counters are converted to gauges). I will make adjustments. EDIT: Replied before my morning coffee, I will move the current |
Adds a client implementation using the prometheus go_client library that exposes metrics. This change also requires the newer prometheus/client_golang code, so the prometheus plugin needed to be changed. Added the following to Godep: - bitbucket.org/ww/goautoneg (in github.com/common/expfmt/encode.go) - prometheus/common/expfmt (in plugins/prometheus.go) - github.com/prometheus/common/model (in plugins/prometheus.go) - github.com/prometheus/procfs (in github.com/client_golang/prometheus) - github.com/beorn7/perks/quantile (in github.com/client_golang/prometheus) X-Github-Issue: influxdata#306
@sparrc I have not changed it to be a new ServiceOutput interface yet, that will be in my next commit. @brian-brazil The code I had written required an update to the prometheus/client_golang library that was in godep, so I had to change the current prometheus plugin to use the new functions. I have tested locally and it looks to be working, but I would like your |
@oldmantaiter That all looks okay from a quick peek, I left some small comments. |
Adds a client implementation using the prometheus go_client library that exposes metrics. This change also requires the newer prometheus/client_golang code, so the prometheus plugin needed to be changed. Added the following to Godep: - bitbucket.org/ww/goautoneg (in github.com/common/expfmt/encode.go) - prometheus/common/expfmt (in plugins/prometheus.go) - github.com/prometheus/common/model (in plugins/prometheus.go) - github.com/prometheus/procfs (in github.com/client_golang/prometheus) - github.com/beorn7/perks/quantile (in github.com/client_golang/prometheus) X-Github-Issue: influxdata#306
@brian-brazil Great, thanks, updated to use port I'll keep plugging away on the interface for ServiceOutput. At this point, would it make more sense for me to track this in a PR or continue updating this issue? |
Thanks a bunch @oldmantaiter, send me an email cameron (at) influxdb.com if you'd like to do a google hangout Feel free to open a PR anytime you'd like us to review some code, doesn't have to be finished |
- Adds a client implementation using the prometheus go_client library that exposes metrics. - Adds a new type of output "ServiceOutput" which follows inline with the "ServicePlugin", adding a Stop and Start method for the service This change also requires the newer prometheus/client_golang code, so the prometheus plugin needed to be changed. Added the following to Godep: - bitbucket.org/ww/goautoneg (in github.com/common/expfmt/encode.go) - prometheus/common/expfmt (in plugins/prometheus.go) - github.com/prometheus/common/model (in plugins/prometheus.go) - github.com/prometheus/procfs (in github.com/client_golang/prometheus) - github.com/beorn7/perks/quantile (in github.com/client_golang/prometheus) X-Github-Issue: influxdata#306 X-Github-Closes influxdata#306
- Adds a client implementation using the prometheus go_client library that exposes metrics. - Adds a new type of output "ServiceOutput" which follows inline with the "ServicePlugin", adding a Stop and Start method for the service This change also requires the newer prometheus/client_golang code, so the prometheus plugin needed to be changed. Added the following to Godep: - bitbucket.org/ww/goautoneg (in github.com/common/expfmt/encode.go) - prometheus/common/expfmt (in plugins/prometheus.go) - github.com/prometheus/common/model (in plugins/prometheus.go) - github.com/prometheus/procfs (in github.com/client_golang/prometheus) - github.com/beorn7/perks/quantile (in github.com/client_golang/prometheus) X-Github-Meta: closes influxdata#306
- Adds a client implementation using the prometheus go_client library that exposes metrics. - Adds a new type of output "ServiceOutput" which follows inline with the "ServicePlugin", adding a Stop and Start method for the service This change also requires the newer prometheus/client_golang code, so the prometheus plugin needed to be changed. Added the following to Godep: - bitbucket.org/ww/goautoneg (in github.com/common/expfmt/encode.go) - prometheus/common/expfmt (in plugins/prometheus.go) - github.com/prometheus/common/model (in plugins/prometheus.go) - github.com/prometheus/procfs (in github.com/client_golang/prometheus) - github.com/beorn7/perks/quantile (in github.com/client_golang/prometheus) X-Github-Meta: closes influxdata#306
- Adds a client implementation using the prometheus go_client library that exposes metrics. - Adds a new type of output "ServiceOutput" which follows inline with the "ServicePlugin", adding a Stop and Start method for the service This change also requires the newer prometheus/client_golang code, so the prometheus plugin needed to be changed. Added the following to Godep: - bitbucket.org/ww/goautoneg (in github.com/common/expfmt/encode.go) - prometheus/common/expfmt (in plugins/prometheus.go) - github.com/prometheus/common/model (in plugins/prometheus.go) - github.com/prometheus/procfs (in github.com/client_golang/prometheus) - github.com/beorn7/perks/quantile (in github.com/client_golang/prometheus) X-Github-Meta: closes influxdata#306
- Adds a client implementation using the prometheus go_client library that exposes metrics. - Adds a new type of output "ServiceOutput" which follows inline with the "ServicePlugin", adding a Stop and Start method for the service This change also requires the newer prometheus/client_golang code, so the prometheus plugin needed to be changed. Added the following to Godep: - bitbucket.org/ww/goautoneg (in github.com/common/expfmt/encode.go) - prometheus/common/expfmt (in plugins/prometheus.go) - github.com/prometheus/common/model (in plugins/prometheus.go) - github.com/prometheus/procfs (in github.com/client_golang/prometheus) - github.com/beorn7/perks/quantile (in github.com/client_golang/prometheus) X-Github-Meta: closes influxdata#306
- Adds a client implementation using the prometheus go_client library that exposes metrics. - Adds a new type of output "ServiceOutput" which follows inline with the "ServicePlugin", adding a Stop and Start method for the service This change also requires the newer prometheus/client_golang code, so the prometheus plugin needed to be changed. Added the following to Godep: - bitbucket.org/ww/goautoneg (in github.com/common/expfmt/encode.go) - prometheus/common/expfmt (in plugins/prometheus.go) - github.com/prometheus/common/model (in plugins/prometheus.go) - github.com/prometheus/procfs (in github.com/client_golang/prometheus) - github.com/beorn7/perks/quantile (in github.com/client_golang/prometheus) X-Github-Meta: closes influxdata#306
- Adds a client implementation using the prometheus go_client library that exposes metrics. - Adds a new type of output "ServiceOutput" which follows inline with the "ServicePlugin", adding a Stop and Start method for the service This change also requires the newer prometheus/client_golang code, so the prometheus plugin needed to be changed. Added the following to Godep: - bitbucket.org/ww/goautoneg (in github.com/common/expfmt/encode.go) - prometheus/common/expfmt (in plugins/prometheus.go) - github.com/prometheus/common/model (in plugins/prometheus.go) - github.com/prometheus/procfs (in github.com/client_golang/prometheus) - github.com/beorn7/perks/quantile (in github.com/client_golang/prometheus) X-Github-Meta: closes influxdata#306
- Adds a client implementation using the prometheus go_client library that exposes metrics. - Adds a new type of output "ServiceOutput" which follows inline with the "ServicePlugin", adding a Stop and Start method for the service This change also requires the newer prometheus/client_golang code, so the prometheus plugin needed to be changed. Added the following to Godep: - bitbucket.org/ww/goautoneg (in github.com/common/expfmt/encode.go) - prometheus/common/expfmt (in plugins/prometheus.go) - github.com/prometheus/common/model (in plugins/prometheus.go) - github.com/prometheus/procfs (in github.com/client_golang/prometheus) - github.com/beorn7/perks/quantile (in github.com/client_golang/prometheus) X-Github-Meta: closes influxdata#306
- Adds a client implementation using the prometheus go_client library that exposes metrics. - Adds a new type of output "ServiceOutput" which follows inline with the "ServicePlugin", adding a Stop and Start method for the service This change also requires the newer prometheus/client_golang code, so the prometheus plugin needed to be changed. Added the following to Godep: - bitbucket.org/ww/goautoneg (in github.com/common/expfmt/encode.go) - prometheus/common/expfmt (in plugins/prometheus.go) - github.com/prometheus/common/model (in plugins/prometheus.go) - github.com/prometheus/procfs (in github.com/client_golang/prometheus) - github.com/beorn7/perks/quantile (in github.com/client_golang/prometheus) X-Github-Meta: closes influxdata#306
- Adds a client implementation using the prometheus go_client library that exposes metrics. - Adds a new type of output "ServiceOutput" which follows inline with the "ServicePlugin", adding a Stop and Start method for the service This change also requires the newer prometheus/client_golang code, so the prometheus plugin needed to be changed. Added the following to Godep: - bitbucket.org/ww/goautoneg (in github.com/common/expfmt/encode.go) - prometheus/common/expfmt (in plugins/prometheus.go) - github.com/prometheus/common/model (in plugins/prometheus.go) - github.com/prometheus/procfs (in github.com/client_golang/prometheus) - github.com/beorn7/perks/quantile (in github.com/client_golang/prometheus) X-Github-Meta: closes influxdata#306
- Adds a client implementation using the prometheus go_client library that exposes metrics. - Adds a new type of output "ServiceOutput" which follows inline with the "ServicePlugin", adding a Stop and Start method for the service This change also requires the newer prometheus/client_golang code, so the prometheus plugin needed to be changed. Added the following to Godep: - bitbucket.org/ww/goautoneg (in github.com/common/expfmt/encode.go) - prometheus/common/expfmt (in plugins/prometheus.go) - github.com/prometheus/common/model (in plugins/prometheus.go) - github.com/prometheus/procfs (in github.com/client_golang/prometheus) - github.com/beorn7/perks/quantile (in github.com/client_golang/prometheus) X-Github-Meta: closes influxdata#306
- Adds a client implementation using the prometheus go_client library that exposes metrics. - Adds a new type of output "ServiceOutput" which follows inline with the "ServicePlugin", adding a Stop and Start method for the service This change also requires the newer prometheus/client_golang code, so the prometheus plugin needed to be changed. Added the following to Godep: - bitbucket.org/ww/goautoneg (in github.com/common/expfmt/encode.go) - prometheus/common/expfmt (in plugins/prometheus.go) - github.com/prometheus/common/model (in plugins/prometheus.go) - github.com/prometheus/procfs (in github.com/client_golang/prometheus) - github.com/beorn7/perks/quantile (in github.com/client_golang/prometheus) X-Github-Meta: closes influxdata#306
- Adds a client implementation using the prometheus go_client library that exposes metrics. - Adds a new type of output "ServiceOutput" which follows inline with the "ServicePlugin", adding a Stop and Start method for the service This change also requires the newer prometheus/client_golang code, so the prometheus plugin needed to be changed. Added the following to Godep: - bitbucket.org/ww/goautoneg (in github.com/common/expfmt/encode.go) - prometheus/common/expfmt (in plugins/prometheus.go) - github.com/prometheus/common/model (in plugins/prometheus.go) - github.com/prometheus/procfs (in github.com/client_golang/prometheus) - github.com/beorn7/perks/quantile (in github.com/client_golang/prometheus) X-Github-Meta: closes influxdata#306
- Adds a client implementation using the prometheus go_client library that exposes metrics. - Adds a new type of output "ServiceOutput" which follows inline with the "ServicePlugin", adding a Stop and Start method for the service This change also requires the newer prometheus/client_golang code, so the prometheus plugin needed to be changed. Added the following to Godep: - bitbucket.org/ww/goautoneg (in github.com/common/expfmt/encode.go) - prometheus/common/expfmt (in plugins/prometheus.go) - github.com/prometheus/common/model (in plugins/prometheus.go) - github.com/prometheus/procfs (in github.com/client_golang/prometheus) - github.com/beorn7/perks/quantile (in github.com/client_golang/prometheus) Fixes aerospike configuration so defaults can be run with the docker-compose environment. X-Github-Meta: closes influxdata#306
- Adds a client implementation using the prometheus go_client library that exposes metrics. - Adds a new type of output "ServiceOutput" which follows inline with the "ServicePlugin", adding a Stop and Start method for the service This change also requires the newer prometheus/client_golang code, so the prometheus plugin needed to be changed. Added the following to Godep: - bitbucket.org/ww/goautoneg (in github.com/common/expfmt/encode.go) - prometheus/common/expfmt (in plugins/prometheus.go) - github.com/prometheus/common/model (in plugins/prometheus.go) - github.com/prometheus/procfs (in github.com/client_golang/prometheus) - github.com/beorn7/perks/quantile (in github.com/client_golang/prometheus) Fixes aerospike configuration so defaults can be run with the docker-compose environment. X-Github-Meta: closes influxdata#306
- Adds a client implementation using the prometheus go_client library that exposes metrics. - Adds a new type of output "ServiceOutput" which follows inline with the "ServicePlugin", adding a Stop and Start method for the service This change also requires the newer prometheus/client_golang code, so the prometheus plugin needed to be changed. Added the following to Godep: - bitbucket.org/ww/goautoneg (in github.com/common/expfmt/encode.go) - prometheus/common/expfmt (in plugins/prometheus.go) - github.com/prometheus/common/model (in plugins/prometheus.go) - github.com/prometheus/procfs (in github.com/client_golang/prometheus) - github.com/beorn7/perks/quantile (in github.com/client_golang/prometheus) X-Github-Meta: closes influxdata#306
- Adds a client implementation using the prometheus go_client library that exposes metrics. - Adds a new type of output "ServiceOutput" which follows inline with the "ServicePlugin", adding a Stop and Start method for the service This change also requires the newer prometheus/client_golang code, so the prometheus plugin needed to be changed. Added the following to Godep: - bitbucket.org/ww/goautoneg (in github.com/common/expfmt/encode.go) - prometheus/common/expfmt (in plugins/prometheus.go) - github.com/prometheus/common/model (in plugins/prometheus.go) - github.com/prometheus/procfs (in github.com/client_golang/prometheus) - github.com/beorn7/perks/quantile (in github.com/client_golang/prometheus) X-Github-Meta: closes influxdata#306
I was wondering if it is inline with the project goals/style for me to have an output plugin for prometheus that is a local HTTP server that listens on a configurable address/port for prometheus to poll. Basically it would enable a prometheus client. I have a working implementation, but was wondering if it would be of use before writing tests etc.
The text was updated successfully, but these errors were encountered: