I want to migrate my existing Grafana Exporter to Alloy

Hi
As I have executed the basic config.alloy to send host data without any exporter, I now wish to migrate my existing Grafana exporter to Alloy. However, I have encountered some issues and need your assistance.

  1. In my application, I have created a Grafana Agent configuration (node_exporter.service) with Grafana (v9.3.2) which looks like this:
prometheus:
  global:
    scrape_interval: 60s
  wal_directory: /tmp/grafana-agent-host-wal
server:
  http_listen_port: 12348
  log_level: error
integrations:
  node_exporter:
    enabled: true
    disable_collectors:
      - infiniband
  prometheus_remote_write:
  - url:  https://cortex.x.x.com/api/prom/push
    headers:
      X-Scope-OrgID: nexxxxxx

According to the reference document, the convert command can convert Prometheus configuration (from Prometheus v2.45) to an Alloy configuration (link: Grafana Alloy CLI Convert).

However, when I try to convert directly from my configuration, it throws an error. But when I change my agent-host.yaml to the following format:

scrape_configs:
  - job_name: 'prometheus'
    static_configs:
      - targets: ['localhost:12348']
remote_write:
  - url:  https://cortex.x.x.com/api/prom/push
    headers:
      X-Scope-OrgID: nexxxxxxxx

It gets converted into Alloy config successfully.

Could you please assist me in understanding why this issue occurs and how to resolve it without modifying my original configuration?