prometheus-juju-exporter snap collects machines' running status in all models under a Juju controller. It also provides an interface to expose the metrics to Prometheus for storage and further usage.
To get the latest stable version of the snap from Snapstore, run:
sudo snap install prometheus-juju-exporter
To install snap from a specific channel, e.g. 2.9/stable
, use --channel
flag:
sudo snap install prometheus-juju-exporter --channel 2.9/stable
Note: please refer to Juju Version Compatibility to select the proper snap channel depending on the version of the juju controller that the snap will communicate with.
To get the latest development version of the snap, build from the source code and install with --dangerous
flag:
make build
sudo snap install --dangerous prometheus-juju-exporter.snap
By default, prometheus-juju-exporter uses the configuration specified in config_default.yaml. It's likely not fitting your need because the values provided are generic and for demonstration purposes only. To configure the snap for your own environment, create a config.yaml
file in $SNAP_DATA
(see Snap Environment Variables) directory with the desired entries.
The snap requires juju user's credentials to connect to a controller and all of its models. The credentials are set as juju.username
and juju.password
config values. Normally, superuser
privilege is expected for such a user for full access to the controller. However, in case it is not possible, the minimum privilege requirements are:
login
access to the controller instance andadmin
access to the model hosting the controlleradmin
access to any model that's expected to be monitored by this exporter
Due to the limitations of libjuju's cross-version support, channels and versions are used in the snap to accommodate different juju controller versions. The following table demonstrates the compatibility matrix between juju controller version, snap channel, snap version, and branch in the repository. The operator should select the proper snap channel at installation time accordingly.
Juju Controller Version | Snap Channel | Repo Branch | Snap Version |
---|---|---|---|
2.8 and older | 2.8/stable 2.8/candidate 2.8/edge |
2.8 | 1.x |
2.9 | 2.9/stable 2.9/candidate 2.9/edge |
2.9 | 2.x |
3.x | 3/stable 3/candidate 3/edge |
3 | 3.x |