I need to forward logs from loki to grafana cloud via api

Hi

I have connected promtail to loki , both are installed in a same linux server

but the loki needs to ship the logs to grafana in cloud

I have used this config

auth_enabled: false

server:
http_listen_port: 3100
grpc_listen_port: 9096

common:
instance_addr: 127.0.0.1
path_prefix: /tmp/loki
storage:
filesystem:
chunks_directory: /tmp/loki/chunks
rules_directory: /tmp/loki/rules
replication_factor: 1
ring:
kvstore:
store: inmemory

schema_config:
configs:
- from: 2023-04-15
store: boltdb
object_store: filesystem
schema: v11
index:
prefix: index_
period: 168h

ruler:
alertmanager_url: http://localhost:9093

clients:
grafana:
url:
basic_auth:
username:
password:

when I try to run this one

  1. ./loki-linux-amd64 -config.file=./loki-config.yml
  2. shows the error " **failed parsing config: ./loki-config.yml: yaml: line 31: did not find expected key. Use -config.expand-env=true flag if you want to expand environment variables in your config file"**strong text

Could you please help me with this, thanks

If your destination is Grafana Cloud you don’t need Loki. Configure promtail to ship logs to Grafana Cloud directly.

1 Like

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.