Skip to content
This repository has been archived by the owner on Nov 8, 2022. It is now read-only.

Plugin Wanted: Publisher for Prometheus #1196

Closed
mbbroberg opened this issue Sep 9, 2016 · 8 comments
Closed

Plugin Wanted: Publisher for Prometheus #1196

mbbroberg opened this issue Sep 9, 2016 · 8 comments

Comments

@mbbroberg
Copy link
Contributor

mbbroberg commented Sep 9, 2016

I'd like to get a publisher that can play well with Prometheus. Given Prometheus has a pull model and Snap is designed for a push model, I could see a couple routes forward:

  1. Use the Snap file publisher and format it in a way where Prometheus' node exporter can parse it
  2. Use the Push Gateway feature, which is a good to have option but not the recommended way forward from the project maintainers

I think a distant 3rd option would be an endpoint service which we publish to and then use the Prometheus client library to consume it. That has the benefit of more efficient traffic using protobuffs, but adds complexity given it will be a long-running service.

Whatever the approach, it would be best to focus on a cloud native architecture given Prometheus' emphasis there, which means Snap is running in a container.

@andrzej-k
Copy link
Contributor

@mjbrender I also think that Prometheus publisher would be very useful.

Alternatively - What do you think about having a processor plugin to format snap metrics Prometheus way? For features like this one: https://github.com/kubernetes/heapster/blob/master/docs/proposals/push-metrics.md instead of file publisher we could then use REST publisher.

@elianka
Copy link

elianka commented Nov 21, 2016

+1

@irom77
Copy link
Contributor

irom77 commented Dec 25, 2016

Will 3rd option (i.e.here ?) have to include its own scheduler, same in case of node exporter ? At least the push gateway feature can use Snap scheduler. Snap Prometheus processor will require Push Gateways anyways , right ?

@pdf
Copy link

pdf commented Jan 14, 2017

@irom77 one way to deal with it might be to just buffer metrics in memory until the Prometheus scraper comes along to collect them, using the Snap scheduler to push them onto the buffer. Metrics would be dropped from the buffer based on age or buffer size, whether they've been collected or not to avoid memory blow-out. Obviously this comes with some resource overhead, but performance will be better than the file-backed option.

@adragomir
Copy link
Contributor

Hey, I created an initial version that pushes the metrics to the Push Gateway (option 2) (as the least resistance initial path), it can be found here: https://github.com/hstack/snap-plugin-publisher-prometheus

@andrzej-k
Copy link
Contributor

That's a great news @adragomir - thank you for your contribution!
Would you be interested in adding this plugin to our plugins catalog? Here are some guides on how to do this:

@mbbroberg
Copy link
Contributor Author

This issue will be resolved by the next running on pluginsync with pr:catalog. Aiming to get to that tomorrow. Thanks again for writing the plugin @adragomir!

@IzabellaRaulin
Copy link
Contributor

@adragomir - thank you for your contribution! Your plugin will be added to plugin catalog in PR #1663, so I close this issue.

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

No branches or pull requests

8 participants