I am trying to setup loki exporter with open telemetry on k8s to push logs to Grafana cloud. But the collector pod itself is failing with “CrashLoopBackOff” error and exit code 1:
"Back-off restarting failed container opentelemetry-collector in pod otelcollect-opentelemetry-collector-agent-lwcz4_otel-demo(9ca4db3b-351b-4033-a156-c64ef5a47a97)"
Below is the configuration used:
exporters:
debug:
verbosity: detailed
loki:
endpoint: "https://cloudlogs.grafana.net/loki/api/v1/push"
auth:
authenticator: basicauth/logs
extensions:
health_check:
endpoint: ${env:MY_POD_IP}:13133
memory_ballast: {}
basicauth/logs:
client_auth:
username: username
password: "generatedtoken"
processors:
batch:
send_batch_size: 10000
receivers:
otlp:
protocols:
grpc:
endpoint: ${env:MY_POD_IP}:4319
http:
endpoint: ${env:MY_POD_IP}:4320
logs_url_path: /v2/logs
traces_url_path: /v2/traces
service:
extensions: [health_check, memory_ballast, basicauth/logs]
pipelines:
logs:
exporters: [debug, loki]
processors: [batch]
receivers: [otlp]
The container however runs if I revert the loki configurations.