Skip to content
This repository has been archived by the owner on Aug 31, 2020. It is now read-only.

Ignore exposed ports during explicit discovery mode #10

Merged
merged 2 commits into from
Aug 31, 2020

Conversation

jhoglin
Copy link

@jhoglin jhoglin commented Jan 28, 2020

During explicit discovery mode only collect ports specified in label. This is helpful if your container expose some ports not serving metrics.

Explicit discovery already ignores all containers not labelled prometheus.scan=true, with this change you also need to explicitly label containers with the port to collect. prometheus.port=8080.

@llacroix
Copy link

llacroix commented Feb 1, 2020

@jhoglin this project seems to be pretty much dead. I started an alternative project that try to cover more use case than this project. Instead of explicitely exposing 1 port, it can be used to explicitely discover multiple ports.
Thought it doesn't try to use the exposed ports as it's not exactly possible to tell which port has the monitoring endpoint. While exposed ports may not always be really used in reality. So I didn't bother with it as docker doesn't really have a standard way to expose a service.

The project is here if it can be a good alternative for you.
https://github.com/llacroix/prometheus-swarm-discovery

@amouat amouat merged commit 35c3fe4 into ContainerSolutions:master Aug 31, 2020
@amouat
Copy link
Contributor

amouat commented Aug 31, 2020

Hi @jhoglin . I work at Container Solutions and I'm currently going through all our open source projects.

I'd like to apologise that you never got a reply for this PR. This definitely isn't the experience we're aiming for with our projects :(

I'm about to archive this project as it's unmaintained and there is now native support in prometheus, but I'll merge your PR anyway. Thanks for your work!

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

Successfully merging this pull request may close these issues.

3 participants