This exporter allows scraping of data from a Saltstack minion. The exporter must run on a minion, and have permission to execute commands locally.
To install and run:
pip install saltstack_exporter
saltstack_exporter
The direct invocation works since pip
installs a wrapper executable script.
If this does not work on your platform, call python directly on exporter.py
in the site_packages
directory. For example, on Linux with Python 2.7:
python /usr/lib/python2.7/site-packages/saltstack_exporter/exporter.py
Below are the available flags:
usage: exporter.py [-h] [--listen-addr LISTEN_ADDR] [--listen-port LISTEN_PORT]
[--highstate-interval HIGHSTATE_INTERVAL]
[--log-level LOG_LEVEL]
optional arguments:
-h, --help show this help message and exit
--listen-addr LISTEN_ADDR
address to bind to (default: 0.0.0.0)
--listen-port LISTEN_PORT
port to bind to (default: 9175)
--highstate-interval HIGHSTATE_INTERVAL
interval between highstate test runs (default: 300)
--log-level LOG_LEVEL
log level (default: WARN)
Currently, the exporter exposes metrics for highstate conformity only:
Metric | Description |
---|---|
saltstack_states_total | Number of states which apply to the minion in highstate |
saltstack_nonhigh_states | Number of states which would change on state.highstate |
saltstack_error_states | Number of states which returns an error on highstate dry-run |
saltstack_last_highstate | Timestamp of the last highstate test run |