fluent-plugin-loki icon indicating copy to clipboard operation
fluent-plugin-loki copied to clipboard

Authentication is not working from fluentd-->Loki-->Grafana

Open Manoharan-NMS opened this issue 1 year ago • 4 comments

Configuration File Details

Fluentd File: /etc/td-agent/td-agent.conf

<match huge.log>
  @type loki
  format json
  url "http://localhost:3100"
  username test
  password test

  <buffer>
    @type memory
    chunk_limit_size 8m
    compress gzip
  </buffer>

  flush_at_shutdown true
  flush_mode interval
  flush_interval 5s
  flush_thread_count 10

  extra_labels {"job":"huge.log", "host":"workstation_hl_new", "agent":"fluentd_hl_new" }
  <label>
      filename
  </label>
</match>

Loki File: loki-local-config.yaml

auth_enabled: true

Grafana:

Under loki datasource Basic Auth Details given

Expected: Able to communicate through Authentication.

Actual Error in Grafana

logger=context userId=1 orgId=1 uname=admin t=2022-11-29T14:56:15.50091764+05:30 level=error msg="Failed to call resource" error="no org id\n" traceID=
logger=context userId=1 orgId=1 uname=admin t=2022-11-29T14:56:15.501022502+05:30 level=error msg="Request Completed" method=GET path=/api/datasources/5/resources/labels status=500 remote_addr=[::1] time_ms=1 duration=1.690432ms size=51 referer=http://localhost:3000/datasources/edit/EWm6GTdVz handler=/api/datasources/:id/resources/*
``

Manoharan-NMS avatar Nov 29 '22 09:11 Manoharan-NMS