feat(metrics): NEWT_METRICS_INCLUDE_TUNNEL_ID toggle; conditionally drop tunnel_id across bytes/sessions/proxy/reconnect; docs and smoke test updated; examples/prometheus.yml with relabels; docker-compose defaults avoid double-scrape

Former-commit-id: b20f7a02b2fe861d27111f8c7716a225866ee025
This commit is contained in:
Marc Schäfer
2025-10-08 00:53:40 +02:00
parent 9f682c3a5f
commit 9db7da4426
7 changed files with 93 additions and 44 deletions
+16 -5
View File
@@ -2,9 +2,20 @@ global:
scrape_interval: 15s
scrape_configs:
- job_name: newt
- job_name: 'newt'
scrape_interval: 15s
static_configs:
- targets: ["newt:2112"]
- job_name: otel-collector
static_configs:
- targets: ["collector:8889"]
- targets: ['newt:2112'] # /metrics
relabel_configs:
# optional: tunnel_id droppen
- action: labeldrop
regex: 'tunnel_id'
# optional: nur bestimmte sites zulassen
- action: keep
source_labels: [site_id]
regex: '(site-a|site-b)'
# WARNING: Do not enable this together with the 'newt' job above or you will double-count.
# - job_name: 'otel-collector'
# static_configs:
# - targets: ['collector:8889']