Grafana agent does not send logs to loki

Hi,
I use this tutorial to setup agent on my docker-compose

This project was blue print for my config:

I only care for the logs so after setup loking in grafana cloud my config looks like this:

Agent:

server:
  log_level: debug

logs:
  configs:
    - name: default
      positions:
        filename: /tmp/positions.yaml
      scrape_configs:
        - job_name: jobname
          static_configs:
            - targets: [localhost]
              labels:
                job: jobname
                __path__: /logs/*log

      clients:
        - url: https://logs-prod-017.grafana.net/loki/api/v1/push
          basic_auth:
            username: <username>
            password: <pass>
      target_config:
        sync_period: 10s

And docker compose

...
  agent:
    image: grafana/agent:latest
    volumes:
      - ./agent.yaml:/etc/agent-config/agent.yaml
      - logs:/logs:ro
      - /tmp/agent:/etc/agent
    entrypoint:
      - /bin/agent
      - -config.file=/etc/agent-config/agent.yaml
      - -enable-features=integrations-next
      - -config.expand-env
      - -config.enable-read-api
    environment:
      HOSTNAME: agent
    ports:
      - "127.0.0.1:4317:4317"

volumes:
  logs:
...

Run everything, image is working ok, but then nothing is send to cloud.
Logs for agent this looks like this:

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