grafana / alloy

OpenTelemetry Collector distribution with programmable pipelines
https://grafana.com/oss/alloy
Apache License 2.0
1.39k stars 203 forks source link

Make UI path-aware #938

Open dvisigalli opened 5 months ago

dvisigalli commented 5 months ago

Request

Would be good to have a way to make Grafana Alloy UI aware of the subpath, just like is possible to do with Grafana UI (by the envs GF_SERVER_ROOT_URL and GF_SERVER_SERVE_FROM_SUB_PATH

Use case

The feature would be useful in all the scenarios where the service is exposed through a proxy

csh0101 commented 5 months ago

can you explain details for this usecase.. I just wonder it ..

dvisigalli commented 5 months ago

i'm deploying a self hosted Grafana Stack (Grafana, Tempo, Prometheus, Loki + Alloy as Otel collector), i need to expose Alloy UI through Traefik proxy on a subpath

kshitijmjoshi commented 4 months ago

Isn't this doable via uiPathPrefix?

dvisigalli commented 4 months ago

Isn't this doable via uiPathPrefix?

maybe this is a way, actually I'm not a big expert of helm charts: do you think there is a way to set this property in config.alloy or through a env variable?

kshitijmjoshi commented 4 months ago

Isn't this doable via uiPathPrefix?

maybe this is a way, actually I'm not a big expert of helm charts: do you think there is a way to set this property in config.alloy or through a env variable?

I am not aware if this is doable via config.alloy or env variable. I was able to use this configuration

  alloy:
    uiPathPrefix: /alloy

to route /alloy* to the alloy service.

To avoid this, you could also use a dedicated subdomain and all traffic on that subdomain to the service without the need of using path based routing.