Configure fluentd with loki

Hi,
I am trying to configure fluentbit that comes with GKE with loki official helm chart. I am unable to push logs to loki.
I am using below configmap to push logs to loki.

apiVersion: v1
kind: ConfigMap
metadata:
name: fluent-bit-config
namespace: kube-system
data:
fluent-bit.conf: |
[SERVICE]
flush 1
log_level info
[INPUT]
name tail
path /etc/data/data.log
tag log_generator
[OUTPUT]
Name stdout
Match *
[OUTPUT]
# for sending logs to local Loki instance
name loki
match *
host loki-gateway.monitoring
port 80
labels job=fluentbit, $sub['stream']

I have added below lines to refer configmap and volume mounts.

mountPath: /fluent-bit/etc/fluent-bit.conf
name: fluent-bit-config
configMap:
defaultMode: 420
name: fluent-bit-config
name: fluent-bit-config

What errors do you see?

hi @tonyswumac , thanks for responding.
I cannot see any error in fluentbit pod. They just keep restarting after 3-4 min interval.

Try enabling debug log on fluentbit and see if there is anything obvious there. I don’t personally use fluentbit myself, so probably won’t be of much help.

hi @tonyswumac , I have started using fluentbit helm chart with loki-stack. I can see the logs now but it labels everything with a single job as fluentbit. I cannot see anything in loki dashboard as well