Confused between two agent configs

Hi, I’d like to set up a Linux server agent.

My problem is that the two configs on the website and the one installed by the shell command are different.

This is what the website tells me:

integrations:
  node_exporter:
    enabled: true
    relabel_configs:
    - replacement: abcd
      target_label: instance

logs:
  configs:
  - name: integrations
    scrape_configs:
    - job_name: integrations/node_exporter_journal_scrape
      journal:
        max_age: 24h
        labels:
          instance: abcd
          job: integrations/node_exporter
      relabel_configs:
      - source_labels: ['__journal__systemd_unit']
        target_label: 'unit'
      - source_labels: ['__journal__boot_id']
        target_label: 'boot_id'
      - source_labels: ['__journal__transport']
        target_label: 'transport'
      - source_labels: ['__journal_priority_keyword']
        target_label: 'level'

And this is what the agent installed by default in /etc/grafana-agent.yaml:

integrations:
  node_exporter:
    enabled: true
    relabel_configs:
    - replacement: hn2
      target_label: instance
  prometheus_remote_write:
  - basic_auth:
      password: qwerty
      username: 123456
    url: https://prometheus-prod-01-eu-west-0.grafana.net/api/prom/push
logs:
  configs:
  - clients:
    - basic_auth:
        password: qwerty
        username: 234567
      url: https://logs-prod-eu-west-0.grafana.net/loki/api/v1/push
    name: integrations
    positions:
      filename: /tmp/positions.yaml
    scrape_configs:
    - job_name: integrations/node_exporter_journal_scrape
      journal:
        labels:
          instance: hn2
          job: integrations/node_exporter
        max_age: 24h
      relabel_configs:
      - source_labels:
        - __journal__systemd_unit
        target_label: unit
      - source_labels:
        - __journal__boot_id
        target_label: boot_id
      - source_labels:
        - __journal__transport
        target_label: transport
      - source_labels:
        - __journal_priority_keyword
        target_label: level
    - job_name: integrations/node_exporter_direct_scrape
      static_configs:
      - labels:
          __path__: /var/log/{syslog,messages,*.log}
          instance: hn2
          job: integrations/node_exporter
        targets:
        - localhost
    target_config:
      sync_period: 10s
metrics:
  configs:
  - name: integrations
    remote_write:
    - basic_auth:
        password: qwerty
        username: 345678
      url: https://prometheus-prod-01-eu-west-0.grafana.net/api/prom/push
  global:
    scrape_interval: 60s
  wal_directory: /tmp/grafana-agent-wal

Which one should I use? The one on the website seems not to have any secret strings, so I guess the /etc/grafana-agent.yaml one is better. But then what is the website trying to say?

Hi @zsoltero ! The agent configuration files generated from the Integrations & Connections walkthrough in the hosted Grafana environment is usually the most up to date source of info. Some areas of the public documentation might be a bit behind. Can you confirm which doc you are comparing against the config provided by the install script?

The first config you shared looks more like a preview snippet. That example does not have the metrics or logs remote_write endpoint details, nor does it specify the global config settings such as the WAL location or scrape interval. The second config example you shared looks more complete.