GithubHelp home page GithubHelp logo

gleeds / apcupsd-monitor Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 10 KB

Docker container to expose apcupsd data for use by Prometheus/Grafana

License: MIT License

Dockerfile 85.63% Shell 14.37%
apcupsd docker grafana prometheus

apcupsd-monitor's Introduction

apcupsd-monitor

Docker container to expose apcupsd data for use by Prometheus/Grafana

Connects to APC UPS devices via a USB and exposes data for consumption by Prometheus. I use this on a Raspberry Pi to add my UPS data to InternetPi.

This project makes use of apcupsd_exporter to expose apcupsd's metrics over HTTP in a form Prometheus can easily consume.

Configuration

Edit apcupsd.conf as you see fit, particuarly if you prefer to use an Ethernet connected APC UPS device. You must rebuild existing container images after changes to this file.

Building

Build the container locally by running: docker build -t apcupsd-docker:latest .

Running

Assuming you have a docker-compose.yaml file already for Prom/Grafana, add a service as follows:

  apcups:
    image: apcupsd-docker:latest
    expose:
      - 9162
    ports:
      - 9162:9162
    restart: always
    devices:
      - "/dev/usb/hiddev0:/dev/usb/hiddev0"

Integration with Prometheus/Grafana

Prometheus

Add somethign like this to your prometheus.yml

  - job_name: 'ups'
    static_configs:
      - targets: ['apcups:9162']

Grafana

A sample Grafana dashboard configuration file is provided in /grafana/ups.json.

TODO

  • Add the ability to pull configuration at runtime rather than build time

apcupsd-monitor's People

Contributors

gleeds 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.