Prometheus client for Indigo

Posted on
Sat Jul 04, 2020 6:42 am
jheddings offline
User avatar
Posts: 149
Joined: Dec 01, 2013
Location: Denver, CO

Prometheus client for Indigo

Hello Indigo Community!

I'm messing around with a Prometheus client plugin for Indigo and I thought I'd post my progress so far... I haven't posted it to the Plugin Store until I am certain it's the right way to go. If you give it a shot, let me know how it works out and any changes you'd like to see!

Why another monitoring plugin? Well, the SQL Logger is perfect for logging all state changes. I've been looking for a tool that will display the information as a time-series, rather than a straight log. For example, if a light is on, the SQL Logger will only update if the state changes. But what about all the time in between? I'm trying to build up a view of something like "show me the number of lights on in my house at a certain time if day" or "show me the cumulative watering times for all sprinkler zones in the past month".

The disadvantage with this approach is that you might miss short events. Specifically, anything that changes before the next polling interval. Additionally, devices often have complex state that cannot be easily represented by a simple metric. In a future version, I am considering how to add support for additional metrics (e.g. using custom Devices or specific state names).

There is also some additional overhead running the collection server and Prometheus itself. In initial testing, this setup is easier on my aging Mac Mini than the full SQL Logger. Admittedly, I'm still running both plugins since the logger has other benefits.

Release Page: https://github.com/jheddings/indigo-pro ... tag/v0.1.0

Posted on
Sun Jul 05, 2020 10:48 am
jheddings offline
User avatar
Posts: 149
Joined: Dec 01, 2013
Location: Denver, CO

Re: Prometheus client for Indigo

Just a quick update... After running for a day, I've been able to keep an eye on how many devices are on at a time:

Image

Pretty cool!

Posted on
Mon Jul 06, 2020 5:02 am
DaveL17 offline
User avatar
Posts: 6744
Joined: Aug 20, 2013
Location: Chicago, IL, USA

Re: Prometheus client for Indigo

Neat. I'd not heard of Prometheus before.
Last edited by DaveL17 on Mon Jul 06, 2020 2:17 pm, edited 1 time in total.

I came here to drink milk and kick ass....and I've just finished my milk.

[My Plugins] - [My Forums]

Posted on
Mon Jul 06, 2020 2:04 pm
matt (support) offline
Site Admin
User avatar
Posts: 21411
Joined: Jan 27, 2003
Location: Texas

Re: Prometheus client for Indigo

DaveL17 wrote:
Neat. I'd not hear of Prometheus before.

Same! Looks interesting, I'm going to definitely have to check it out.

Image

Posted on
Sun Jul 19, 2020 8:57 pm
vtmikel offline
Posts: 628
Joined: Aug 31, 2012
Location: Boston, MA

Re: Prometheus client for Indigo

What have you found to be the advantage of Prometheus compared to InfluxDB? I also found that sending DB logs when state changes to be insignificant. My Grafana/Influx plugin has a minimum update period to send updates even without state changes.


Sent from my iPad using Tapatalk Pro

Posted on
Wed Jul 22, 2020 11:57 am
jheddings offline
User avatar
Posts: 149
Joined: Dec 01, 2013
Location: Denver, CO

Re: Prometheus client for Indigo

Honestly, I haven't looked into InfluxDB in great detail... And I'm not an expert on time-series databases, so I probably wouldn't be able to evaluate them fairly. In some of my initial searching, I did appreciate how easy it was to get Prometheus up and running with some basic visualization. My understanding is that InfluxDB does not have any built-in visualization, but that's probably a minor distinction. However the main reason I started with Prometheus was due to using it at work already :D

After I wrote this plugin, I ran across your InfluxDB / Grafana plugin (nice job!). It gave me some ideas (like the discrete plugin) for visualizing device state. For my use case, I prefer managing the Prometheus and Grafana servers external to the plugin, so I can keep all monitoring in a separate service.

Page 1 of 1

Who is online

Users browsing this forum: No registered users and 1 guest