Compare commits

...
Author SHA1 Message Date
dannygroenewegen f946692234 feat: Add labels for label-based metric scraping
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.
2026-08-10 21:30:24 +02:00
renovate-bot 063e6b4a5a chore(deps): update ghcr.io/techarohq/anubis docker tag to v1.27.0 (#131)
This PR contains the following updates:

| Package | Update | Change |
|---|---|---|
| [ghcr.io/techarohq/anubis](https://images.chainguard.dev/directory/image/static/overview) ([source](https://github.com/chainguard-images/images/tree/HEAD/images/static)) | minor | `v1.26.2` -> `v1.27.0` |

>  **Important**
>
> Release Notes retrieval for this PR were skipped because no github.com credentials were available.
> If you are self-hosted, please see [this instruction](https://github.com/renovatebot/renovate/blob/master/docs/usage/examples/self-hosting.md#githubcom-token-for-release-notes).

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box

---

This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0MS4xNzMuMSIsInVwZGF0ZWRJblZlciI6IjQxLjE3My4xIiwidGFyZ2V0QnJhbmNoIjoibWFzdGVyIiwibGFiZWxzIjpbXX0=-->

Reviewed-on: coop-cloud/traefik#131
Co-authored-by: Renovate Bot <renovate@coopcloud.tech>
Co-committed-by: Renovate Bot <renovate@coopcloud.tech>
2026-08-10 14:36:07 +00:00
7 changed files with 29 additions and 5 deletions
+6 -2
View File
@@ -139,10 +139,14 @@ WRITE_TIMEOUT=0s
#####################################################################
## Enable prometheus metrics collection
## used used by the coop-cloud monitoring stack
## BASIC_AUTH should also be enabled
## Metrics are served unauthenticated on :8082, reachable only from
## other services on the proxy network (e.g. monitoring-ng's Alloy,
## which auto-discovers it via the prometheus.io/scrape label)
#COMPOSE_FILE="$COMPOSE_FILE:compose.metrics.yml"
#METRICS_ENABLED=1
## Setting METRICS_FQDN also adds a public metrics endpoint (behind
## basic auth). BASIC_AUTH should be enabled for this.
#METRICS_FQDN=metrics.traefik.example.com
#####################################################################
+2 -2
View File
@@ -1,4 +1,4 @@
export TRAEFIK_YML_VERSION=v32
export FILE_PROVIDER_YML_VERSION=v12
export TRAEFIK_YML_VERSION=v33
export FILE_PROVIDER_YML_VERSION=v13
export ENTRYPOINT_VERSION=v5
export ANUBIS_YML_VERSION=v1
+1 -1
View File
@@ -7,7 +7,7 @@ services:
- "traefik.http.middlewares.anubis.forwardauth.address=http://anubis:8080/.within.website/x/cmd/anubis/api/check"
- "traefik.http.middlewares.anubis.forwardauth.trustForwardHeader=true"
anubis:
image: "ghcr.io/techarohq/anubis:v1.26.2"
image: "ghcr.io/techarohq/anubis:v1.27.0"
environment:
BIND: ":8080"
TARGET: " "
+6
View File
@@ -3,3 +3,9 @@ services:
app:
environment:
- METRICS_ENABLED
deploy:
labels:
# lets monitoring-ng's Alloy auto-discover and scrape metrics-internal
# via the proxy network.
- "prometheus.io/scrape=true"
- "prometheus.io/port=8082"
+9
View File
@@ -32,6 +32,7 @@ http:
stsSeconds: "31536000"
{{ if eq (env "METRICS_ENABLED") "1" }}
routers:
{{ if ne (env "METRICS_FQDN") "" }}
traefik-metrics:
rule: "Host(`{{ env "METRICS_FQDN" }}`)"
entrypoints:
@@ -41,6 +42,14 @@ http:
middlewares:
- basicauth@file
service: prometheus@internal
{{ end }}
# reachable from other services on the proxy network only (this port
# isn't published to the host), without auth
traefik-metrics-internal:
rule: "PathPrefix(`/`)"
entrypoints:
- metrics-internal
service: prometheus@internal
{{ end }}
tls:
+1
View File
@@ -0,0 +1 @@
1. compose.metrics.yml now adds prometheus.io/scrape labels so services like monitoring-ng can automatically discover and scrape Traefik's metrics.
+4
View File
@@ -112,6 +112,10 @@ entrypoints:
onion:
address: ":9052"
{{- end }}
{{- if eq (env "METRICS_ENABLED") "1" }}
metrics-internal:
address: ":8082"
{{- end }}
ping:
entryPoint: web