Skip to content

Cyberpower UPS Linux daemon (pwrstat) exporter for prometheus

License

Notifications You must be signed in to change notification settings

LorenzoCardinali/pwrstat-exporter

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Pwrstat exporter

Cyberpower UPS Linux daemon (pwrstat) exporter for prometheus

Installation

Must have Linux PowerPanel application from CyberPower already downloaded (https://www.cyberpowersystems.com/product/software/powerpanel-for-linux/) And make sure the pwrstat.service has been started: service pwrstat status

Build from source

Please install golang 1.16

Install dep.

git clone https://github.com/kerwenwwer/pwrstat-exporter.git
cd pwrstat-exporter
go build && mv pwrstat-exporter /usr/local/bin/

Usage

Since that pwrstat require sudo permission so:

sudo pwrstat-exporter 

Args

sudo pwrstat-exporter --web.listen-address 8088 --web.telemetry-path /metrics

Systemd service

Create the service config nano /etc/systemd/system/pwrstat-exporter.service

[Unit]
Description=pwrstat-exporter

[Service]
TimeoutStartSec=0
ExecStart=/usr/local/bin/pwrstat-exporter

[Install]
WantedBy=multi-user.target

Restart the systemd daemon, set the service to start on boot, and start the service manually for the first time.

systemctl daemon-reload

systemctl enable pwrstat-exporter

service pwrstat-exporter start

Dashboard

You can import the dashboard using grafana-dashboard.json grafana

About

Cyberpower UPS Linux daemon (pwrstat) exporter for prometheus

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Go 100.0%