Get the ID of the hottest sensor

Hello there,

I have some sensors in Prometheus called cca_nodeexporter_sensors. They have the following labels: title, ID, unit. I now want to display in a gauge which is the highest temperature measured in the last hour. So I query the following:

max(max_over_time(wty_nodeexporter_ralf_sensors{title="Temperature"}[1h]))
which results in
image

So far so good. But now I wish to display the corresponding ID, too, like in the query below:

max_over_time(wty_nodeexporter_ralf_sensors{title="Temperature"}[1h])
image

Is there any chance to display the ID in the gauge or, if its not possible in an extra (text?)panel?

Thanks in advance,
Spider

Hi,

The Singlestat panel don’t support string values which I understand is the Id label.

Regarding text panel I think it’s possible to use that if you first create a template variable to hold the Id value of the hottest sensor and then reference that variable in text panel.

Other options would be using the table panel.

Marcus