Hi,
On 11/18/19 5:21 PM, fahad wrote:
> I tried to build the dashboard for node-exporter(Linux VM) using hwmon
> collector.
> Please review it, is it right?
> There is showing temperature 2 times, even I am selecting particular
> host (variable)
I think there are two problems:
First, you are graphing how long the collector took. As the metric name
says, this is a duration in seconds which you try to graph as a
temperature in Celsius. This would explain the strange values. :)
Rather look for node_hwmon_temp_celsius etc. If there are no such
metrics, you may have first try to make your kernel expose these
information. Maybe some sensor module has to be loaded first.
Second, you say that you get two values rather than one. This is
probably related to a missing label selector. You selected a single
target in your dashboard. However, that's just the Grafana part of it.
You will also have to add this information into your PromQL query. Try
editing one of the existing panels to see how it is done (especially
what the variable is called).
You probably want something like:
node_hwmon_temp_celsius{instance="$instance"}
where $instance will be replaced with your selected target by Grafana
(Prometheus will never see this variable).
> Tried for windows but no success.
> Any suggestions please.
What exactly have you tried? Did you enable the collector? How? What does
curl http://some-windows-machine:wmi_exporter_port/metrics | grep temp
yield?
Kind regards,
Christian