Prometheus Client  

Developer: Jason's Plugins
Category: Reporting/UI/Control Pages
Github: Github Repo
Assistance: Get help!   
Plugin ID: com.heddings.indigo.prometheus
Latest release: v0.1.3 released on Oct. 23, 2020
Release downloaded: 0 times
Requires: Indigo v7.0.2 or higher
  Download latest release

indigo-prometheus

Prometheus is a time-series database, widely used for visualizing application metrics. This is a simple client that will present device & variable information for Prometheus to gather. Once running, Prometheus has a rich query engine for building simple views or you can integrate with much more powerful visualization tools (such as Grafana).

Configuring the Plugin

You can choose to present variables, devices or both. If you run into performance issues with either option, please submit an issue.

Custom Metrics

In addition to the automatic metrics for devices and variables, you can create devices in Indigo that will present custom metrics for scraping.

Viewing Data

Once your plugin is configured, you can view the metrics by visiting http://localhost:9167/metrics (replace host and port as needed). This is the default endpoint used by Prometheus to scrape data. This can be done before installing Prometheus.

Installing Prometheus

The easiest way to install Prometheus on macOS is using Homebrew. From there, you can either register it as a service to run automatically, or run it manually to view debugging output.

Configuring Prometheus

Once you have Prometheus installed, simply add the following job to your scrape_configs and restart Prometheus:

- job_name: 'indigo' scrape_interval: 1m static_configs: - targets: ['localhost:9176']

Modify scrape_interval or other configuration values as needed for your installation.

Querying Prometheus

Once you start collecting data, Prometheus has a rich query language called PromQL.

Example: track the value of a single variable over time

Variables are stored in time series using their ID:

indigo_var_1061581346_value

TIP: The same variable can be referenced by name using a label selector: {name="cfg_irrigation_wx_coef"}

Example: show how many SwitchLinc devices are on throughout the day

Device states are either on (1) or off (0). Using label selectors and regular expressions, metrics can be combined into custom reports.

sum({model=~"SwitchLinc.*"})

Release details
Released on: Oct. 23, 2020
Requires: Indigo v7.0.2+
Downloaded: 0 times 
Changes in this release

Initial release of Prometheus client for Indigo.

Requirements

You will need to add specific jobs to an existing Prometheus instance for this plugin.