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
Prometheus client for Indigo
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](https://github.com/jheddings/indigo-prometheus/raw/master/etc/images/example_switchlinc_day_med.png)
Pretty cool!
![Image](https://github.com/jheddings/indigo-prometheus/raw/master/etc/images/example_switchlinc_day_med.png)
Pretty cool!
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]
[My Plugins] - [My Forums]
- matt (support)
- Site Admin
- Posts: 21450
- Joined: Mon Jan 27, 2003 1:17 pm
- Location: Texas
- Contact:
Re: Prometheus client for Indigo
Same! Looks interesting, I'm going to definitely have to check it out.DaveL17 wrote:Neat. I'd not hear of Prometheus before.
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
Sent from my iPad using Tapatalk Pro
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
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.
![Very Happy :D](./images/smilies/icon_biggrin.gif)
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.