-
Notifications
You must be signed in to change notification settings - Fork 930
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
loki.api.url
should discard any provided /loki/api/v1/push
#12271
Comments
I prefer dropping the |
LXD adds the "/loki/api/v1/push" suffix to `loki.api.url` automatically. There's no need for the user to provide it. Should it be provided anyway, the suffix is stripped. Fixes canonical#12271 Signed-off-by: Thomas Hipp <thomas.hipp@canonical.com>
My preference would be to improve the docs and explain that LXD will add the Also if we start stripping stuff from the URL that the user provides we don't know if they do infact need that, perhaps to get through a reverse proxy to their loki server. |
Mention that LXD adds the `/loki/api/v1/push` suffix to the provided `loki.api.url` config value. Fixes canonical#12271 Signed-off-by: Thomas Hipp <thomas.hipp@canonical.com>
Mention that LXD adds the `/loki/api/v1/push` suffix to the provided `loki.api.url` config value. Fixes canonical#12271 Signed-off-by: Thomas Hipp <thomas.hipp@canonical.com>
When configuring integration with Loki, one provides LXD with the URL to Loki's API. Since a URL can include the path, a user may do
lxc config set loki.api.url=http://10.76.66.141:3100/loki/api/v1/push
. The problem is that LXD unconditionally appends/loki/api/v1/push
to the provided URL resulting in bogus HTTP POSTs tohttp://10.76.66.141:3100/loki/api/v1/push/loki/api/v1/push
.The doc on
loki.api.url
is pretty succinct so I think it's a fair mistake for someone to do, at least I think I did when implementing the charm because the Loki integration lib returnshttp://${hostname|ip}:3100/loki/api/v1/push
and I feed that directly to LXD. While I could fix the charm, I think the LXD side should be improved. Either by dropping any provided/loki/api/v1/push
suffix or by rejecting the value as bogus.The text was updated successfully, but these errors were encountered: