Skip to main content

Contributors Forks Stargazers Issues GPL License Python Version Buy Me A Coffee LinkedIn

WatchMyUPS

A FastAPI application to expose data from UPS devices via NUT (Network UPS Tools).

Table of Contents
  1. About The Project
  2. Getting Started
  3. Usage
  4. Changelog
  5. Contributing
  6. License
  7. Contact
  8. Donation

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.

(back to top)

Getting Started

Prerequisites

  1. Install and configure NUT (Network UPS Tools) (AYou can also check this for a more detailed NUT installation guide.)
  2. Install Docker (This step is optional. You can follow it if you want to run WatchMyUPS on a container.)

(back to top)

Installation

Pip

  1. Clone the repo
    git clone https://github.com/murratefe/watchmyups.git
    
  2. Install the requirements
    cd watchmyups
    pip install .
    

Docker

  1. Clone the repo
    cd watchmyups
    git clone https://github.com/murratefe/watchmyups.git
    
  2. Docker up
    docker-compose up
    

(back to top)

Usage

  1. 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
    
  2. 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.

(back to top)

Changelog

See the CHANGELOG for a detailed list of changes and updates.

(back to top)

Contributing

See the CONTRIBUTING file for contribution guidelines.

(back to top)

License

This project is licensed under the GNU General Public License v3.0 (GPLv3). See the LICENSE file for details.

(back to top)

Contact

Murat EFE

linkedin-shield
github-shield
kaggle-shield
reddit-shield

(back to top)

Donation

If you find this project useful and would like to support its development, consider buying me a coffee!

Buy Me A Coffee
You can also buy me a coffee via usdt-shield 0xba2ea63a519ed0eb4342f410b0a91990244c4308

You can also support the project by starring the repository and sharing it with others.

(back to top)

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)

Source distribution for watchmyups 1.0.0
File Size Uploaded
watchmyups-1.0.0.tar.gz 45.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for watchmyups 1.0.0
File Interpreter ABI Platform
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

Release history Release notifications | RSS feed

This release

1.0.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page