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

This commit is contained in:
Marc Schäfer
2025-10-08 00:53:40 +02:00
parent f28d90595b
commit b20f7a02b2
7 changed files with 93 additions and 44 deletions

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']