Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Breaking changes in Grafana agent config #14

Closed
josuablejeru opened this issue Jul 16, 2022 · 2 comments
Closed

Breaking changes in Grafana agent config #14

josuablejeru opened this issue Jul 16, 2022 · 2 comments

Comments

@josuablejeru
Copy link
Contributor

Hello everyone!

Today I was doing some investigation regarding Loki because I couldn't get logs inside of Grafana Cloud. At the end the path passed inside of promtail-config.yaml.j2 has changed from /api/prom/push to /loki/api/v1/push.

Before I push a PR fixing this, it would be nice if someone could confirm my findings. My Grafana stack is only a couple of days old and could have only a new version with the breaking change. Also, my Instances are in eu-west-0 which could also behave differently for now.

After reading threw the Docs it seems like a lot of things have changed for agent-config.yaml
This is what I'm using now and all my issues with Loki and Prometheus are resolved.

server:
  http_listen_port: 12345
  log_level: info

metrics:
  wal_directory: /tmp/grafana-agent-wal
  global:
    scrape_interval: 15s
    remote_write:
      - url: https://prometheus-{{ grafana_location_prometheus }}.grafana.net/api/prom/push
        basic_auth:
          username: {{ prometheus_user }}
          password: {{ grafana_api_key }}
  configs:
    - name: default
      scrape_configs:
        - job_name: agent
          static_configs:
            - targets: ['127.0.0.1:12345']

logs:
  configs:
  - name: default
    positions:
      filename: /tmp/positions.yaml
    scrape_configs:
      - job_name: varlogs
        static_configs:
          - targets: [localhost]
            labels:
              job: varlogs
              __path__: /var/log/*log
    clients:
      - url: https://logs-prod-eu-west-0.grafana.net/loki/api/v1/push
        basic_auth:
          username: {{ loki_user }}
          password: {{ grafana_api_key }}

integrations:
  node_exporter:
    enabled: true

Your input is highly appreciated @nleiva

@nleiva
Copy link
Owner

nleiva commented Aug 17, 2022

Yeah, @bekriebel noticed another changed as well (06306f4). Feel free to submit a PR, I have not had a chance to test this myself yet.

@localleon
Copy link

I can confirm this change. My setup did break too and your changes seem to resolve that! Thanks for looking into it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants