Git Product home page Git Product logo

cyberpower_exporter's Introduction

cyberpower_exporter

This is an application for exporting cyberpower ups metrics to Prometheus.

Installation

First, install the CyberPower PowerPanel Personal Linux software: https://www.cyberpowersystems.com/product/software/power-panel-personal/powerpanel-for-linux/

Second, make sure you have python3 and pip3 installed. Then:

sudo pip3 install git+https://gitlab.com/shouptech/[email protected]

Installing as root is important. The application must run as root in order to access the cyberpower data.

You could simply run it as root like this:

sudo /usr/local/bin/cyberpower_exporter

But that would not be great because it wouldn't run in the background. If you're using systemd, it's easy to make a service.

Create the file /etc/systemd/system/cyberpower_exporter.service with these contents:

[Unit]
Description=CyberPower Exporter
After=network-online.target

[Service]
Type=simple
User=root
Group=root
ExecStart=/usr/local/bin/cyberpower_exporter
SyslogIdentifier=cyberpower_exporter
Restart=always

[Install]
WantedBy=multi-user.target

Then enable & start the service:

$ sudo systemctl daemon-reload
$ sudo systemctl enable cyberpower_exporter.service
Created symlink /etc/systemd/system/multi-user.target.wants/cyberpower_exporter.service โ†’ /etc/systemd/system/cyberpower_exporter.service.
$ sudo systemctl start cyberpower_exporter.service

If you have a firewall enabled, ensure you allow port 10100 through.

Test that it's working by running:

curl <ipaddress>:10100

Now go ahead and point prometheus to it!

Changelog

0.2

  • Created environment variable CYBERPOWER_EXPORTER_POLL_INTERVAL for adjusting polling interval.
  • Moved input rating and output rating to prometheus gauges to make it easier to use those data points in dashboards.

0.1

Initial release

cyberpower_exporter's People

Contributors

shouptech avatar

Stargazers

Jorge Ocanas Jr avatar

Watchers

 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.