fluent / fluent-plugin-prometheus

A fluent plugin that collects metrics and exposes for Prometheus.
Apache License 2.0
258 stars 79 forks source link

Add out_prometheus_pushgateway #134

Closed ganmacs closed 4 years ago

ganmacs commented 4 years ago

Support pushgateway to push metrics instead of being scrapped by Prometheus. pushgateway interface of prometheus/client_ruby is https://github.com/prometheus/client_ruby/tree/v0.9.0#pushgateway

kazegusuri commented 4 years ago

Actually I intentionally haven't added the push feature in this plugin because AFAIK prometheus recommends to use scraping metrics instead of push.

IMO, push feature is used for something does not provide metrics endpoints for protmetheus natively. So is there good use case to introduce this in this plugin?

ganmacs commented 4 years ago

Sorry, I've understood what you are getting at. So I changed comment at all.

Actually I intentionally haven't added the push feature in this plugin because AFAIK prometheus recommends to use scraping metrics instead of push.

Yes, I know that. Prometheus document says

We only recommend using the Pushgateway in certain limited cases.

in https://prometheus.io/docs/practices/pushing .

But I believe it should be determined by users if they make use of which feature. so what providing the feature is good for me (and community) as long as there isn't too much maintenance cost.

IMO, push feature is used for something does not provide metrics endpoints for protmetheus natively. So is there good use case to introduce this in this plugin?

You're right. A user needs to install pushgateway to use prometheus_pushgaway plugin. I think it's useful for short live container env like a batch. but currently, there is no actual use case for it.

ganmacs commented 4 years ago

@kazegusuri WDYT? If you are not for it, I'll close this PR and create this new plugin :)

repeatedly commented 4 years ago

@kazegusuri @ganmacs Any progress? Should release new gem separately or this plugin can support pushgateway?

kazegusuri commented 4 years ago

Honestly I don't want to provide push gateway feature. I think it's best a good product only provide a good API (good default) for simplicity. Providing different ways might confuse users.

However, if you have a will to manage this plugin, it's okay. In other word, I want to give an ownership of this plugin to you (guys). (As you know) I don't have enough time to improve this plugin and actually I haven't used Prometheus self for a long time. So you are thinking to improve constantly, those people should maintain this plugin for solving their problems.

ganmacs commented 4 years ago

Honestly I don't want to provide push gateway feature. I think it's best a good product only provide a good API (good default) for simplicity. Providing different ways might confuse users.

Ok. it's reasonable for me. I'll create a new feature for pushgateway.

However, if you have a will to manage this plugin, it's okay. In other word, I want to give an ownership of this plugin to you (guys). (As you know) I don't have enough time to improve this plugin and actually I haven't used Prometheus self for a long time. So you are thinking to improve constantly, those people should maintain this plugin for solving their problems.

Sorry for bothering you... From next time, we will take ownership of this plugin. of course, if you have any feedback, we are very welcome :)

ganmacs commented 4 years ago

Thank so much! I'll close this!