Prometheus client for Indigo

User avatar
jheddings
Posts: 149
Joined: Sun Dec 01, 2013 10:26 pm
Location: Denver, CO

Prometheus client for Indigo

Post by jheddings »

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
User avatar
jheddings
Posts: 149
Joined: Sun Dec 01, 2013 10:26 pm
Location: Denver, CO

Re: Prometheus client for Indigo

Post by jheddings »

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!
User avatar
DaveL17
Posts: 6839
Joined: Tue Aug 20, 2013 11:02 am
Location: Chicago, IL, USA
Contact:

Re: Prometheus client for Indigo

Post by DaveL17 »

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]
User avatar
matt (support)
Site Admin
Posts: 21450
Joined: Mon Jan 27, 2003 1:17 pm
Location: Texas
Contact:

Re: Prometheus client for Indigo

Post by matt (support) »

DaveL17 wrote:Neat. I'd not hear of Prometheus before.
Same! Looks interesting, I'm going to definitely have to check it out.
Image
vtmikel
Posts: 646
Joined: Fri Aug 31, 2012 12:45 pm
Location: Boston, MA
Contact:

Re: Prometheus client for Indigo

Post by vtmikel »

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
User avatar
jheddings
Posts: 149
Joined: Sun Dec 01, 2013 10:26 pm
Location: Denver, CO

Re: Prometheus client for Indigo

Post by jheddings »

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.
Post Reply

Return to “Prometheus Client”