Summary
In my Kubernetes setup (Flux + Prometheus Operator), Newt metrics only work when we manually set both:
extraEnv.NEWT_METRICS_PROMETHEUS_ENABLED: "true"
global.metrics.adminAddr: "0.0.0.0:9090"
Without these overrides, ServiceMonitor scraping fails.
Environment
- Helm chart:
fosrl/newt (1.2.0)
- Deployment method: Flux
HelmRelease
- Monitoring: Prometheus Operator (
ServiceMonitor)
- Metrics service enabled via chart values (
global.metrics.service.enabled: true)
- ServiceMonitor enabled via chart values (
global.metrics.serviceMonitor.enabled: true)
What I observe
- Metrics Service and Endpoints are created and point to port
9090.
- ServiceMonitor scrapes the
metrics service port.
- Newt pod does not expose working metrics unless we set both values above.
Observed failure modes:
connection refused on podIP:9090 when Newt is still bound to loopback/default admin address.
404 /metrics when Prometheus exporter is not explicitly enabled.
Why both settings are required in my environment
1) NEWT_METRICS_PROMETHEUS_ENABLED: "true"
global.metrics.enabled: true in chart values does not reliably enable the Newt Prometheus exporter at runtime by itself.
In our rendered deployment:
NEWT_METRICS_PROMETHEUS_ENABLED is not present by default.
--metrics CLI flag is also not present.
Result: /metrics is not served (404), even if admin HTTP is reachable.
2) adminAddr: "0.0.0.0:9090"
Default admin binding is loopback-oriented (127.0.0.1:2112 behavior path), which is not reachable through Kubernetes Service/Endpoints scraping from outside the container namespace.
My ServiceMonitor path is:
Prometheus -> Service -> PodIP:9090
Therefore Newt must bind to a non-loopback address and matching port.
0.0.0.0:9090 satisfies this and aligns with the chart’s metrics service defaults.
Important: ":9090" is not accepted by chart schema (requires host:port format), so 0.0.0.0:9090 is required.
Current workaround
values:
global:
extraEnv:
NEWT_METRICS_PROMETHEUS_ENABLED: "true"
metrics:
enabled: true
adminAddr: "0.0.0.0:9090"
service:
enabled: true
serviceMonitor:
enabled: true
Summary
In my Kubernetes setup (Flux + Prometheus Operator), Newt metrics only work when we manually set both:
extraEnv.NEWT_METRICS_PROMETHEUS_ENABLED: "true"global.metrics.adminAddr: "0.0.0.0:9090"Without these overrides, ServiceMonitor scraping fails.
Environment
fosrl/newt(1.2.0)HelmReleaseServiceMonitor)global.metrics.service.enabled: true)global.metrics.serviceMonitor.enabled: true)What I observe
9090.metricsservice port.Observed failure modes:
connection refusedonpodIP:9090when Newt is still bound to loopback/default admin address.404 /metricswhen Prometheus exporter is not explicitly enabled.Why both settings are required in my environment
1)
NEWT_METRICS_PROMETHEUS_ENABLED: "true"global.metrics.enabled: truein chart values does not reliably enable the Newt Prometheus exporter at runtime by itself.In our rendered deployment:
NEWT_METRICS_PROMETHEUS_ENABLEDis not present by default.--metricsCLI flag is also not present.Result:
/metricsis not served (404), even if admin HTTP is reachable.2)
adminAddr: "0.0.0.0:9090"Default admin binding is loopback-oriented (
127.0.0.1:2112behavior path), which is not reachable through Kubernetes Service/Endpoints scraping from outside the container namespace.My ServiceMonitor path is:
Prometheus -> Service -> PodIP:9090Therefore Newt must bind to a non-loopback address and matching port.
0.0.0.0:9090satisfies this and aligns with the chart’s metrics service defaults.Important:
":9090"is not accepted by chart schema (requireshost:portformat), so0.0.0.0:9090is required.Current workaround