Closed andyslin closed 4 years ago
Prometheus' consul client does not support a context path. The property you are using is intended for host and port only, not a context path (see https://prometheus.io/docs/prometheus/latest/configuration/configuration/#consul_sd_config). Hence, slashes are escaped.
You could try to use a reverse proxy (like nginx) to add the context path to the requests. This should work as the endpoints of this adapter don't build any paths themselves. All the path logic is done on the client in prometheus.
My Eureka Server contains context-path, so configured as consul_sd_configs:-server: localhost:8500/context-path, on prometheus, but in the end prometheus reports about Get http://localhost:8500/context-path%2Fv1/catalog/services.