I want to reach my Loki instance from a subpath like so:
<mydomain>/monitoring/loki/<loki specific path>
I can’t find any information on how to configure that? Is it even possible? I know that it is with Prometheus using flags like --web.external-url but I don’t know how similar Loki is to Prometheus.
Okay I have checked the options with docker run grafana/loki -help and the flag I mentioned is not included there. So I guess it is not possible? Grepped for url and the only remotely related option I found is -frontend.downstream-url with the description: “URL of downstream Prometheus”.
And with more details, in case it helps someone else:
This assume all the services are defined in a single docker-compose setup with vanilla names, the Caddy server is the single entry point for the outside world.
Same problem here:
Setting http_path_prefix: /loki
$ curl http://localhost:3100/loki/loki/api/v1/status/buildinfo {"version":"HEAD-e0af1cc","revision":"e0af1cc8a","branch":"HEAD","buildUser":"root@5004faa13e2e","buildDate":"2022-12-09T19:23:40Z","goVersion":""}
but e.g. $ curl http://localhost:3100/loki/loki/api/v1/labels 404 page not found
Reverse proxy isn’t even used at this stage. Version 2.5.0 did find the labels, but not the values of the labels.