Giter VIP home page Giter VIP logo

prometheus-eaton-ups-exporter's Introduction

Eaton UPS Prometheus Exporter

Description

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.

This is a fork of psyinfra/prometheus-eaton-ups-exporter with updates from adyekjaer/prometheus-eaton-ups-exporter

Information Exported

  • System details
  • Temperature
  • Input Voltage (V)
  • Input Frequency (Hz)
  • Output Voltage (V)
  • Output Frequency (Hz)
  • Output Current (A)
  • Output Apparent Power (VA)
  • Output Active Power (W)
  • Output Power Factor
  • Output Percent Load (%)
  • Battery Voltage (V)
  • Battery Capacity (%)
  • Battery Remaining Time (s)
  • Battery Health Status (given as the remaining lifetime in years [uncertain, see #19])

Supported Devices:

  • Eaton 5P Series should work with recent firmwares

Usage:

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)

Defaults:

  • Default host-address is 0.0.0.0
  • Default port is 9795 (see also: Prometheus default port allocations)
  • Login timeout is set to 3 seconds
  • Other request timeouts are set to 2 seconds
  • Static values are described in prometheus_eaton_ups_exporter/scraper_globals.py

Requirements:

Installation:

git clone https://github.com/psyinfra/prometheus-eaton-ups-exporter.git
cd prometheus-eaton-ups-exporter
pip install -r requirements.txt

Docker

Images available at hub.docker.com

Testing:

Install requirements with

pip install -r test-requirements.txt

Runt tests with

pytest tests

Test-Requirements:

  • pytest
  • pytest-vcr

Build container image

podman buildx build --platform linux/amd64,linux/arm64 -t prometheus-eaton-ups-exporter:latest .

test it locally:

podman run -d -p 9795:9795 -v ./config.json:/usr/src/app/etc/config.json:Z localhost/prometheus-eaton-ups-exporter:latest

To publish multi arch

podman manifest create prometheus-eaton-ups-exporter:latest
podman buildx build --platform=linux/arm64,linux/amd64 --file Dockerfile --manifest prometheus-eaton-ups-exporter:latest .
podman manifest push prometheus-eaton-ups-exporter:latest docker://your-registry.io/prometheus-eaton-ups-exporter:latest

Credits

  • psyinfra for the exporter itself
  • adyekjaer for updates to work with newer firmwares

prometheus-eaton-ups-exporter's People

Contributors

tobiaskadelka avatar aqw avatar mathisloevenich avatar nvollmar avatar joeharrison714 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.