Giter Club home page Giter Club logo

hirechrisjohnston / nagios-apcupsd Goto Github PK

View Code? Open in Web Editor NEW
3.0 0.0 4.0 32 KB

Nagios Python plugin for APC UPS software apcupsd daemon and apcaccess client to query for status and performance graphs. The purpose of this project was to support multiple UPS and blend active/passive Nagios checks to reduce latency on power loss, down to the grace period defined in apcupsd.

License: MIT License

Python 80.62% Shell 19.38%
apcupsd ups nagios-plugins nagios python nrdp nagios-apcupsd chart-performance-graphs nrpe

nagios-apcupsd's Introduction

nagios-apcupsd

Nagios plugin for APC UPS software apcupsd to query for status and chart performance graphs with near instant updates (with some tweeks of Nagios settings).

Design

  • check_apcaccess.py is used to check a APC UPS using the apcaccess client utility.
    • At startup multiple apcupsd instances, if config present, to monitor multiple UPS hardware devices on a single host using apcupsd-multi systemd init script
  • NRPD for passive check to notify of power loss or gain based on the apcups configuration
  • NRPE for active checks at regular intervals under 'normal' conditions and other types of checks

For fast response at the expense of a higher Nagios server load when using passive checks

      check_result_reaper_frequency=1

Other settings such as refresh rates under 'Performance' in Nagios, can futher provide instant visual indication in Nagios XI of power fluxuations and the status of the battery backup.

Description

Used for montioring American Power Conversion APC UPS using apcupsd (3.14.12) on RaspberryPi 2B+ for a fun project. I did this because I like Pi, Nagios, flashing lights, servers, and colorful interactive charts :-)

Power consumption, watts, is calculated because the UPS that I had to develop with didn't report that value but was extracted dividing load % and the maximum load NOMPOWER value.

Options

If specifying the -T or -t for time based alerts you must define them both. When using time based thresholds performance data will be charted in minutes.

Options:
  --version             show program's version number and exit
  -h, --help            show this help message and exit

  Generic options:
    -d, --debug         enable debugging outputs
    -H HOST, --host=HOST
                        host of appcupsd
    -X LINE_LEVEL, --line-level=LINE_LEVEL
                        Volts of power outlet to detect no power if less than
                        the line level

  Monitoring options:
    -P, --enable-perfdata
                        enables performance data (default: no)

  Threshold options:
    -w VOLTS, --battv-warning=VOLTS
                        Defines battery voltage warning threshold (default:
                        24)
    -W VOLTS, --battv-critical=VOLTS
                        Defines battery voltage critical threshold (default:
                        23.3)
    -l PERCENT, --load-warning=PERCENT
                        Defines load warning threshold in percent (default:
                        50%)
    -L PERCENT, --load-critical=PERCENT
                        Defines load critical threshold in percent (default:
                        80%)
    -b PERCENT, --battery-warning=PERCENT
                        Defines battery load warning threshold in percent
                        (default: 30%)
    -B PERCENT, --battery-critical=PERCENT
                        Defines battery load critical threshold in percent
                        (default: 15%)
    -t TIME, --time-warning=TIME
                        Defines battery time left warning threshold in minutes
                        (default: empty). If defined you must also define
                        time-critical
    -T TIME, --time-critical=TIME
                        Defines battery time left critical threshold in
                        minutes (default: empty). If defined you must also
                        define time-warning
    -u WATTS, --consumption-warning=WATTS
                        Defines power consumption warning threshold in watts
                        (default: empty)
    -U WATTS, --consumption-critical=WATTS
                        Defines power consumption critical threshold in watts
                        (default: empty)

Credits

nagios-apcupsd's People

Contributors

hirechrisjohnston avatar

Stargazers

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