A Prometheus exporter for Eaton UPSs. Data is collected from the REST API of the web UI of Eaton UPSs and is made available for Prometheus to scrape.
The exporter can monitor multiple UPSs.
UPSs to monitor and their credentials are defined in a config file. See
config.json
for an example.
./prometheus_eaton_ups_exporter.py [-h] [-w WEB.LISTEN_ADDRESS] -c CONFIG [-k] [-t] [-v] [--login-timeout {range 2 - 10}]
optional arguments:
-h, --help show this help message and exit
-w WEB.LISTEN_ADDRESS, --web.listen-address WEB.LISTEN_ADDRESS
Interface and port to listen on, in the format of "ip_address:port".
If the IP is omitted, the exporter listens on all interfaces. (default: 0.0.0.0:9795)
-c CONFIG, --config CONFIG
Configuration JSON file containing UPS addresses and login info (default: None)
-k, --insecure Allow the exporter to connect to UPSs with self-signed SSL certificates (default: False)
-t, --threading Whether to use multi-threading for scraping (faster) (default: False)
-v, --verbose Be more verbose (default: False)
--login-timeout {range 2 - 10}
The login timeout for the UPSs in seconds (default: 3)
0.0.0.0
prometheus_eaton_ups_exporter/scraper_globals.py
git clone https://github.com/psyinfra/prometheus-eaton-ups-exporter.git
cd prometheus-eaton-ups-exporter
pip install -r requirements.txt
Install requirements with
pip install -r test-requirements.txt
Runt tests with
pytest tests