feat: Add labels for label-based metric scraping #132

Closed
dannygroenewegen wants to merge 1 commits from eCommons/traefik:metrics-internal-network into master
Member

We're upgrading to monitoring-ng recipe to support label based metrics discovery.

This PR adds prometheus.io labels to compose.metrics.yml so monitoring-ng can auto-discover and scrape Traefik's metrics on the internal network when enabled.

We're upgrading to monitoring-ng recipe to support label based metrics discovery. This PR adds prometheus.io labels to compose.metrics.yml so monitoring-ng can auto-discover and scrape Traefik's metrics on the internal network when enabled. * [x] I have deployed and tested my changes * [x] I have [updated relevant versions in `abra.sh`](https://docs.coopcloud.tech/maintainers/upgrade/#updating-versions-in-the-abrash) * [x] I have made my environment variable changes [backwards compatible](https://docs.coopcloud.tech/maintainers/upgrade/#backwards-compatible-environment-variable-changes) * [x] I have added a [release note entry](https://docs.coopcloud.tech/maintainers/upgrade/#creating-new-release-notes)
dannygroenewegen requested review from traefik-maintainers 2026-08-10 19:35:24 +00:00
Owner

Nice!

Nice!
p4u1 approved these changes 2026-08-13 15:35:03 +00:00
Dismissed
p4u1 left a comment
Owner

Lgtm

Lgtm
p4u1 requested changes 2026-08-25 17:16:08 +00:00
Dismissed
p4u1 left a comment
Owner

Actually on second thought. Why is this not reachable to the outside? I think if the server has that port open the metrics endpoint will be reachable from the outside

Actually on second thought. Why is this not reachable to the outside? I think if the server has that port open the metrics endpoint will be reachable from the outside
Author
Member

Actually on second thought. Why is this not reachable to the outside? I think if the server has that port open the metrics endpoint will be reachable from the outside

Binding to :8082 inside the container isn't the same as exposing it. Traefik only listens on that port for its own networks (proxy and internal). It only becomes reachable from the outside if it's added to a service's ports: list. Only 80/443 are published in compose.yml. I also checked every other compose.*.yml overlay and none of them adds 8082 to ports: either.

So, :8082 is only reachable by other containers on the proxy or internal networks.

> Actually on second thought. Why is this not reachable to the outside? I think if the server has that port open the metrics endpoint will be reachable from the outside Binding to :8082 inside the container isn't the same as exposing it. Traefik only listens on that port for its own networks (proxy and internal). It only becomes reachable from the outside if it's added to a service's `ports:` list. Only 80/443 are published in compose.yml. I also checked every other compose.*.yml overlay and none of them adds 8082 to `ports:` either. So, :8082 is only reachable by other containers on the proxy or internal networks.
p4u1 approved these changes 2026-08-26 11:48:36 +00:00
p4u1 left a comment
Owner

Thanks for reconfirming!
One final task: can you bump the trafeik yanl Version to 35?

Thanks for reconfirming! One final task: can you bump the trafeik yanl Version to 35?
dannygroenewegen added 1 commit 2026-08-26 17:08:50 +00:00
feat: Add labels for label-based metric scraping
continuous-integration/drone/pr Build is failing
ad565ee9c9
Add prometheus.io labels to compose.metrics.yml so monitoring-ng can
auto-discover and scrape Traefik's metrics on the internal network when
enabled.
dannygroenewegen force-pushed metrics-internal-network from f946692234 to ad565ee9c9 2026-08-26 17:08:50 +00:00 Compare
Author
Member

Thanks for reconfirming!
One final task: can you bump the trafeik yanl Version to 35?

Rebased and updated the config version to v35. I think this is because you're planning to also merge #128 ? But just to check: #126 updated the config to v33, but this hasn't been released yet. So #128 and this PR could also be merged while staying on v33, right? And then, when released, there is a config update from v32->v33 containing all three of these changes?

> Thanks for reconfirming! > One final task: can you bump the trafeik yanl Version to 35? Rebased and updated the config version to v35. I think this is because you're planning to also merge #128 ? But just to check: #126 updated the config to v33, but this hasn't been released yet. So #128 and this PR could also be merged while staying on v33, right? And then, when released, there is a config update from v32->v33 containing all three of these changes?
Owner

merged in #132

merged in https://git.coopcloud.tech/coop-cloud/traefik/pulls/132
p4u1 closed this pull request 2026-09-02 10:28:31 +00:00

Pull request closed

Please reopen this pull request to perform a merge.
Sign in to join this conversation.