Stream logs to Loki

Problem statement

I am trying to send logs to Loki ( Grafana Loki OSS | Log aggregation system ), but your log stream does not allow me to set basic auth parameters.

I tried putting them inline, but that doesn’t work.

Payload URL: https://244184:<Your Grafana.com API Key>@logs-prod3.grafana.net/loki/api/v1/push

Loki uses basic auth for the incoming push.

How can we get this working?

Cause

Auth0 does not provide the facility to stream logs to Loki.

Solution

There is a workaround to this problem. In order to push log streams to Loki, you would need to use fluentd, which is a log routing system. You’d stand up a fluentd http input source: http - Fluentd, and send the logs to Loki, by using the Loki fluentd output plugin: https://grafana.com/docs/loki/latest/clients/fluentd/