Grafana is not fetching wmi exporter metrics

  1. I am using wmi exporter downloaded and it is working fine

  2. In my linux server i have downloaded prometheus and added “wmi exporter” configuration in “prometheus.yml” file.
    Example:
    scrape_configs:
    - job_name: ‘WMI exporter’
    static_configs:
    - targets: [‘x.x.x.x:9182’]

  3. Also i have downloaded “grafana” from this link’https://grafana.com/grafana/download’ and configured the “prometheus” server successfully.

  4. I have downloaded the windows json file file from this link ‘https://grafana.com/dashboards/2129/revisions’ and imported the json file in grafana successfully.

  5. After all the above configuration if i run the windows node , grafana is not scraping and showing the data in UI.

  6. But if i run “http:server_ip:9090” , prometheus is scraping the data successfully and showing the “wmi exporter” value as “UP”.

  7. Kindly assist me what i am doing wrong in this.

I have downloaded wmi exporter in the link ‘https://github.com/martinlindhe/wmi_exporter/releases

I have downloaded prometheus in the link ‘https://prometheus.io/download/

if i create new dashboard and add “wmi exporter” query(for example: wmi_process_cpu_time_total{creating_process_id=“5468”,mode=“user”,process=“chrome”,process_id=“7140”}) , ‘grafana’ is fetching the metrics and displaying in graph. I think need to update the ‘scrape_configs’ in “prometheus.yml” file correctly , so that it will display the data in UI. If anybody having idea please share.

Grafana and Prometheus are two entirely different products, although they are often used together. Grafana does absolutely no scraping whatsoever. That’s Prometheus’ job. Meanwhile, Prometheus just gathers the data… it has nothing to do with displaying it.

If you can get Grafana to display the graph you want by editing a new dashboard, that implies that Prometheus is doing its job correctly. So there’s no point in changing anything in scrape_configs. In fact, you’ll likely break things if you do.

It is more likely that the dashboard you imported is broken. You should edit it, and make sure that it’s using the right datasource.

1 Like

I have made it right, thanks

Hi, I am facing the same issue… Were you able to fix that?

Regards,
Sathish

1 Like

I’ve installed another Dashboard and it works well.

I am still having this issue. Grafana shows empty values for WMI Importer.
Can some one help what could be the problem. I tried with multiple dashboards.

scrape_configs:
scraped from this config.

  • job_name: ‘prometheus’

    static_configs:

    • targets: [‘localhost:9182’,‘localhost:9090’]

Grafana is sending below query but this returns empty

http://grafana.staged-by-discourse.com/api/datasources/proxy/2/api/v1/query_range?query=wmi_os_virtual_memory_bytes{instance%3D~""}&start=1613278800&end=1613451480&step=120

I had same issue and found most of the dashboards in grafana web were broken. found a great one in Chinese and translated it. uploaded at windows_exporter for Prometheus Dashboard EN dashboard for Grafana | Grafana Labs

2 Likes

Same issue, this dashboard fixed my proble. Thanks once again !!!