Windows export, libre hardware monitor

Hello.
I’m trying to run this project GitHub - Ormiach/lhm_exporter: Collects "Libre Hardware Monitor" stats and creates a prometheus readable metric file.
At the moment, Prometheus is running and collecting data from Windows.
But after importing grafana_dashboard.json. Grafana does not display any data.
Could someone help me?

Hi,

Can you show some screens of the dashboard? Do you have any variables to pick? Can you run the:
lhm_cpu_clock_mhz query in explore mode and screen the results?

1 Like

Thanks for your reply. No variables to pick when importing dashboard.
Could you pleas try it yourself?

Host prusa.hopto.org

Grafana port:3000

Prometheus port 9090

Your prometheus datasource and the dashboard is correct (I’ve connected to the datasource on my local grafana instance and imported that dashboard). With the user provided I can’t check the datasource, nor can I edit the dashboard so two things I would check are:

  1. Is the data source connected correctly (less probable as the root cause)
  2. The dashboard you’ve imported has a constant datasourceId in all the queries. I guess it’s not the same as your datasource Id, so try go into variables section and select the prometheus datasource (I think it should fallback to the default datasource but I don’t have access to the datasources configurations, so I don’t know which one is the default). It should be it.

Don’t forget to edit your recent post and remove the password (also remove the user from grafana if possible :wink:)

1 Like

Thank you very much for your help. I have two data sources in grafana. One from influxdb and the other from protheus. I had to set protheus as default. I also had to change the uid in the dashboard file. Now everything works.
Only one question. Why does it only work if I set Protheus as default data source?

It should work regardless of the datasource set as the default one. In your case when the influxdb was the default one, Grafana assumed that the unknown datasource (the one which ID was in the file) can be changed to the default one. Then the queries couldn’t be made, so that’s it.

When you changed the datasource to the prometheus one and saved, it should work regardless of which datasource is set as the default.

1 Like

Unfortunately it only works for me when Prometheus is set as default :frowning:

dashboard file

I think it’s because this part of the dashboard json:

"templating": {
    "list": [
      {
        "current": {
          "text": "",
          "value": ""
        },
        "definition": "label_values(lhm_cpu_clock_mhz,instance)",
        "description": "",
        "label": "Instance",
        "name": "instance",
        "options": [],
        "query": {
          "qryType": 5,
          "query": "label_values(lhm_cpu_clock_mhz,instance)",
          "refId": "PrometheusVariableQueryEditor-VariableQuery"
        },
        "refresh": 1,
        "regex": "",
        "type": "query"
      },

also needs datasource somewhere. Try to go into the variables section in dashboard setting and check if your datasource is set there and if it’s set correctly.

1 Like

In each query I change the data source identifier to match my protheus.
without these changes the dashboard wouldn’t work even if the proteus was set as default