A short script to push the status information from a compatible* UPS into InfluxDB.
Depending on what UPS you have and how you plan on communicating with it, you'll need to install ONE of the following:
-
CyberPower's PowerPanel Personal - Linux software
-
APC UPS Daemon ('apcupsd')
Regardless of which UPS management tool you install, you'll also need to install InfluxDB: https://portal.influxdata.com/downloads
First install the Python-InfluxDB client.
$ pip install influxdb
Then, depending on which strategy you're using to interface with your UPS, you will either do:
$ python3 apcupsd.py
or
$ python3 cyberpower.py
Depending on how you installed the CyberPower UPS software, you might need sudo access to actually run it. If you need sudo access to run the CyberPower tool then you will also need to run the python script with sudo access (simply prepend 'sudo' to the command).
For instructions on how to add your new InfluxDB source into Grafana, see here: http://docs.grafana.org/features/datasources/influxdb/