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

Rancher support? #1203

Closed
jmreicha opened this Issue Nov 7, 2015 · 13 comments

Comments

Projects
None yet
6 participants
@jmreicha
Copy link

jmreicha commented Nov 7, 2015

Rancher has a nice API, would it be possible to add support for it, similar to the other SD configurations currently supported?

It would be cool to be able to configure Prometheus based on Rancher labels for example.

@fabxc

This comment has been minimized.

Copy link
Member

fabxc commented Nov 7, 2015

In general, absolutely.
It mostly needs someone who writes the implementation (with guidance of course) and agrees to maintain it in the future.

@Rucknar

This comment has been minimized.

Copy link
Contributor

Rucknar commented Mar 8, 2016

@jmreicha basic support can be used through the following. It should expose host/service/stack and label metrics so far... it's quite basic at the moment but open to any pull-requests if you have the time.

https://github.com/Rucknar/prometheus-rancher-exporter

@brian-brazil

This comment has been minimized.

Copy link
Member

brian-brazil commented Mar 8, 2016

That's a rancher exporter (which isn't listed on http://prometheus.io/docs/instrumenting/exporters/ - could you send a PR?), this issue is about service discovery support.

@jmreicha

This comment has been minimized.

Copy link
Author

jmreicha commented Mar 8, 2016

@Rucknar Cool, I will check it out. Thanks for the update!

@Rucknar

This comment has been minimized.

Copy link
Contributor

Rucknar commented Mar 8, 2016

@brian-brazil my mistake, will send a PR!

@jmreicha

This comment has been minimized.

Copy link
Author

jmreicha commented Mar 18, 2016

@Rucknar Getting around to testing this I am running in to an issue getting the prometheus-rancher-exporter Docker image to play with the Prometheus Rancher stack but it looks like issues are closed for the project? What's the best way report and get help with issues?

Updated. I posted my issue to your (awesome) getting started guide, it probably belongs there anyway.

@brutus333

This comment has been minimized.

Copy link

brutus333 commented May 31, 2016

@fabxc: I am willing to take this assignment since we are trying to go into production with Rancher & Prometheus and we need a better solution.
I clearly need some guidance - I will try to use consul_sd code as a starting point but I'm not sure if it's enough.
For rancher metadata I am planning to use the go client: https://github.com/rancher/go-rancher-metadata. If additional feature would be needed, I will PR this code also.
Do you have any advice to start working on this feature?

@fabxc

This comment has been minimized.

Copy link
Member

fabxc commented Jun 1, 2016

The Go client unfortunately lacks documentation but AFAICS there is no polling for changes. In that case one would just refresh every x seconds. For that case the DNS SD is more suitable as an example than the Consul one. It's also easier.

The biggest challenge will be providing testing.
After accepting SD integrations without tests in the past, due to recent regressions I decided to no longer accept such PRs.

I would say just start implementing as far as you get and open a pull request to walk through missing steps together.

@burdiyan

This comment has been minimized.

Copy link

burdiyan commented Nov 16, 2016

Does anyone have any new about that? I'm thinking about implementing Rancher SD for Prometheus but wonder if there is anybody who already started to do something.

@brutus333

This comment has been minimized.

Copy link

brutus333 commented Nov 17, 2016

Hello!
I took a different route, please see: https://github.com/brutus333/prom-rancher-sd
The idea was borrowed from https://github.com/DanielDent/prom-rancher-sd which used json file for Prometheus integration.
I have also a rancher catalog which uses this:
https://github.com/brutus333/rancher-extra-catalog
It is not the most elegant solution, but it was an easy workaround.
A real rancher_sd implementation would be clearly better.

@Rucknar

This comment has been minimized.

Copy link
Contributor

Rucknar commented Oct 25, 2017

@brian-brazil Given rancher 2.0 moving to a kubernetes base, suggest this one is closed off?
DNS service discovery works as-is, kubernetes should be usable once 2.0 is released.

@brian-brazil

This comment has been minimized.

Copy link
Member

brian-brazil commented Oct 25, 2017

That sounds reasonable to me.

@lock

This comment has been minimized.

Copy link

lock bot commented Mar 23, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked and limited conversation to collaborators Mar 23, 2019

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
You can’t perform that action at this time.