WatchMyUPS
A FastAPI application to expose data from UPS devices via NUT (Network UPS Tools).
Table of Contents
About The Project
WatchMyUPS is a FastAPI-based application that utilizes NUT (Network UPS Tools) to collect and expose data from UPS devices. It can be easily integrated with monitoring systems, enables the creation of secure shutdown protocols using data obtained via its API, and can be reliably used in applications that automatically take checkpoints during power outages.
Getting Started
Prerequisites
- Install and configure NUT (Network UPS Tools) (AYou can also check this for a more detailed NUT installation guide.)
- Install Docker (This step is optional. You can follow it if you want to run WatchMyUPS on a container.)
Installation
Pip
- Clone the repo
git clone https://github.com/murratefe/watchmyups.git
- Install the requirements
cd watchmyups pip install .
Docker
- Clone the repo
cd watchmyups git clone https://github.com/murratefe/watchmyups.git
- Docker up
docker-compose up
Usage
- Run the application
python watchmyups.py --nut-host 127.0.0.1 --nut-port 3493 --nut-login admin --nut-password password --export-host 127.0.0.1 --export-port 9999
- You can access the data at http://
<EXPORTER_BIND_ADDRESS>:<EXPORTER_PORT>/
Args
--nut-host: IP address of the NUT server. (default: 127.0.0.1)--nut-port: Port of the NUT server (default: 3493).--nut-login: Username for NUT authentication. (default: None)--nut-password: Password for NUT authentication. (default: None)--nut-debug: Enable debug mode (default: False).--nut-timeout: Timeout for NUT operations in seconds (default: 5).--export-host: Bind address for the exporter (default: 0.0.0.0).--export-port: Port for the exporter service (default: 9999).--docker-mode: Run the application in Docker mode (default: False). If set to True, it will read environment variables instead of command-line arguments.--version: Show the version and exit.--license: Show license information and exit.
Changelog
See the CHANGELOG for a detailed list of changes and updates.
Contributing
See the CONTRIBUTING file for contribution guidelines.
License
This project is licensed under the GNU General Public License v3.0 (GPLv3). See the LICENSE file for details.
Contact
Donation
If you find this project useful and would like to support its development, consider buying me a coffee!
You can also buy me a coffee via 0xba2ea63a519ed0eb4342f410b0a91990244c4308
You can also support the project by starring the repository and sharing it with others.
Metadata
Release files for watchmyups 1.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| watchmyups-1.0.0.tar.gz | 45.6 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| watchmyups-1.0.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 77.7 kB
Release files / watchmyups-1.0.0.tar.gz
| Download URL | watchmyups-1.0.0.tar.gz |
|---|---|
| Size | 45.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d6bcad18cb2916238c54fbeaa9efd7071054092a90ea7989eb69adc716d92e3b
|
|
BLAKE2b-256 checksum How to use checksums |
4951e55f0b21dc2cd4b96b5395b74d43a236532d2dee75fc524a5458f0a2e007
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.3
|
Release files / watchmyups-1.0.0-py3-none-any.whl
| Download URL | watchmyups-1.0.0-py3-none-any.whl |
|---|---|
| Size | 32.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
4f1ae57ed5ff714d93075857af9d7fd5ee6c39a92da8dcae12d81c54f0d41e28
|
|
BLAKE2b-256 checksum How to use checksums |
f24a121828d095f18a53cb1697561ef37c0719e974b3bf77ce6e0eeca29a2efb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.3
|