Prometheus > Grafana Using Non-Numeric Variables

Posted on
Sun Dec 27, 2020 3:30 pm
HFTobeason offline
Posts: 290
Joined: Nov 07, 2003

Prometheus > Grafana Using Non-Numeric Variables

@ jheddings - I've had some success implementing your plugin - thanks!

Screen Shot 2020-12-27 at 13.25.24.png
Screen Shot 2020-12-27 at 13.25.24.png (118.01 KiB) Viewed 662 times

I've run into an issue that is stumping me - the plugin appears to convert all variables into numeric values. For example, I have a variable which tracks the MODE of various thermostats - HEAT|COOL|OFF. I'm at a loss as to how to get those variables across into Grafana.

Any advice most appreciated.

Thanks.

Posted on
Tue Apr 06, 2021 10:07 pm
jheddings offline
User avatar
Posts: 147
Joined: Dec 01, 2013
Location: Denver, CO

Re: Prometheus > Grafana Using Non-Numeric Variables

Sorry for the delayed response here!!

Due to the way that Prometheus stores data, it is not possible to save strings directly and report in Grafana. Unfortunately, the only option would be to create another variable and trigger on status changes, converting them to a numeric value for Grafana to display.

That being said, it's an interesting use case. I will look into creating a custom metric type that does this mapping for you, at least on the Indigo side. You'll still have to set up a Grafana display that interprets numbers as state information (e.g. 0 = off, -1 = cool, +1 = heat or something).

Would that approach work for you?

Posted on
Wed Apr 07, 2021 5:04 pm
HFTobeason offline
Posts: 290
Joined: Nov 07, 2003

Re: Prometheus > Grafana Using Non-Numeric Variables

@jheddings Thank you for your response. No worries re tardiness!

In the interim, I found a Grafana plugin that solved my problem: https://grafana.com/grafana/plugins/nat ... ete-panel/. To be honest, it's been long enough since I got it working that I really don't even remember how I did it...but until it breaks, I'm good to go...

Page 1 of 1

Who is online

Users browsing this forum: No registered users and 1 guest