Windows agent integration

Hi,

New to Grafana cloud for testing purpose, I’ve added my fist linux server very very fast!

But, for Windows one, it’s quite disappointing… Downloaded the Windows agent : OK

Check localhost for logging : OK

And after? I have to install also Loki and Promtail to forward to my Grafana Cloud tenant? Or modifying agent-config.yaml to add tenant adress and API keys?

If someone would hel me a little bit, it would be great!

Thanx

Hey there! We’re still working on the documentation for Windows, apologies that it’s not super clear at the moment.

You don’t need to install Promtail to send logs to Grafana Cloud. You can modify the Agent config to collect logs. Check out this example for details.

Let me know if there’s anything else I can do to help!

Thank, you I will check it.

I guess that it’s the “url” section to modify in order to send it to cloud tenant with API key in it.

I’ll send result back as soon as I try it.

Have a good day! (It’s morning here in France)

Edit : service started successfully but still no metrics in dashboard. Here is my config

server:
  http_listen_port: 12345
prometheus:
  wal_directory: C:\ProgramData\grafana-agent-wal
  global:
    scrape_interval: 15s
  configs:
    - name: integrations
integrations:
  windows_exporter:
    enabled: true
loki:
  # This directory needs to already exist
  positions_directory: C:\temp
  configs:
    - name: windows 
      # Loki endpoint to push logs to
      clients:
        - url: https://68586:someAPIkey@logs-prod-us-central1.grafana.net/api/prom/push
      scrape_configs: 
      - job_name: windows
        windows_events:
          # Note the directory structure must already exist but the file will be created on demand
          bookmark_path: C:\temp\bookmarkbookmark.xml
          use_incoming_timestamp: false
          eventlog_name: "Application"
          # Filter for logs
          xpath_query: '*'
          labels:
            job: windows

Ok, found the problem…

Embedded Dashboard for Windows Agent is looking in prometheus datasource, but Grafana Agent send it to LOKI one.

Can I change this from Grafana Agent or I have to create my own dashboard (if yes, second question : what is the goal of existing one?)

Thank you

You need to add the url and auth for grafana cloud into the global prometheus section.

prometheus:
  wal_directory: C:\ProgramData\grafana-agent-wal
  global:
    scrape_interval: 15s
    remote_write:
        - basic_auth:
            password: <password>
            username: <username>
          url: https://prometheus-us-central1.grafana.net/api/prom/push
  configs:
    - name: integrations

Okaaayy…

Thank you!

For those who are actually searching for Windows Server monitoring, just copy this at the end of your agent-config.yaml file :

  prometheus_remote_write:
   - url: https://prometheus-blocks-prod-us-central1.grafana.net/api/prom/push
     basic_auth:
       username: <your ID>
       password: <API key with Metric Publiqher role>

That’s all, lot of thanks to @mattdurham to bring me on the right way!

Have a good day