Skip to content
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

Sending logs to Loki - how to basic auth #2735

Closed
vlcinsky opened this issue Oct 29, 2020 · 5 comments
Closed

Sending logs to Loki - how to basic auth #2735

vlcinsky opened this issue Oct 29, 2020 · 5 comments
Assignees

Comments

@vlcinsky
Copy link

Bug Report

Describe the bug
We did not find a way to specify username and password for Loki endpoint requiring basic auth.

Using the form https://username:password@host/url does not work.

Expected behavior
Either support the https://username:password@host/url url pattern or provide configuration parameters for basic auth.

@goshander
Copy link

Same problem, it is last step before to perfect use Loki in production. And also support tls is not be superflous)

@MezNyx
Copy link

MezNyx commented Nov 18, 2020

I am also having this issue when trying to use the plugin to send to grafana cloud via their endpoint of:

[OUTPUT]
  name loki
  match *
  host <username>:<apikey>@logs-prod-us-central1.grafana.net/loki/api/v1/push
  port 443

I get the following:

[2020/11/18 17:14:35] [ warn] net_tcp_fd_connect: getaddrinfo(host='<username>:<apikey>@logs-prod-us-central1.grafana.net/loki/api/v1/push'): Name or service not known
[2020/11/18 17:14:35] [error] [io] connection #34 failed to: <username>:<apikey>@logs-prod-us-central1.grafana.net/loki/api/v1/push:443
[2020/11/18 17:14:35] [error] [output:loki:loki.0] no upstream connections available

@nweseloh
Copy link

nweseloh commented Nov 20, 2020

Same issue for us, it is preventing us from using the loki output plugin in production with grafana cloud.

As far as I see, the underlying flb_http_client already supports basic auth + HTTPs scheme, so it might be a fairly easy fix.

@gerrit-amagno
Copy link

Fluent Bit works like a charm but I need support for basic auth and https to use grafana cloud, too. A fix would be perfect!

@edsiper
Copy link
Member

edsiper commented Nov 20, 2020

Thanks everyone for raising this issue.

I've pushed fix d59f1ba to add HTTP Basic Auth. The new options are called http_user and http_passwd.

The enhancement will be part of the next release today.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants