Unable to connect my grafana agent (windows) to grafana cloud

Hi, I am a newbie in grafana, actually I am trying to use grafana cloud to monitor my on premises windows server.

However, after I installed the grafana agent and put in my API key (as attached), I am still unable to connect to the grafana cloud by using my grafana agent.

I am not sure if my current apprach is correct as I am a newbie, but if it wasn’t, please let me know, thanks so much. :slight_smile:

  • What Grafana version and what operating system are you using?
    Grafana cloud

  • What are you trying to achieve?
    connect my grafana agent (windows) to grafana cloud

  • How are you trying to achieve it?
    using agent-config.yaml file

  • What happened?
    after generated the API key and put it in my agent-config.yaml file, couldn’t connect to grafana cloud

  • What did you expect to happen?

  • Can you copy/paste the configuration(s) that you are having problems with?

  • Did you receive any errors in the Grafana UI or in related logs? If so, please tell us exactly what they were.

  • Did you follow any online instructions? If so, what is the URL?

Hello! Did you install the Grafana Agent for Windows through the Grafana Cloud Integrations Walkthrough? This should produce a functional agent-config.yaml with minimal editing required. There several ways to install the agent though, and comparing my config with yours I see that you list “prometheus_remote_write” while mine has only “remote_write” (see below)

server:
  http_listen_port: 12345
prometheus:
  wal_directory: C:\ProgramData\grafana-agent-wal
  global:
    scrape_interval: 15s
    remote_write:
    - basic_auth:
        password: removed
        username: removed
      url: varies by region, check url provided in cloud portal
  configs:
    - name: integrations
integrations:
  windows_exporter:
    enabled: true

I would recommend saving a copy of your current agent-config.yaml and then going through the Integration Walkthrough, confirm that the username is the correct Grafana Cloud stack ID (view details in cloud portal) and go from there. If you still do not see any metrics coming in, contact the Support team for further assistance!