Code Monkey home page Code Monkey logo

zbx-apcupsd's Introduction

zbx-apcupsd

Zabbix Template for USB attached APC UPS

This template is pretty simple, it uses apcupsd to query the UPS over USB, and ingests that data into Zabbix.

Data collected:

  • Battery Charge (%)
  • Battery Voltage (V)
  • Hi-Voltage Transfer Threshold (V)
  • Lo-Voltage Transfer Threshold (V)
  • Line Voltage (V)
  • Minimum Battery Charge (Shutoff threshold) (%)
  • Minimum Time on Battery Remaining (m)
  • UPS State (status)
  • Time Left on Battery (m)
  • Current Load (W) (this value is imprecise, as it is calculated based off of the Load % and the nominal power rating (pulled from apcaccess and used as a macro))
  • Model name
  • Serial Number
  • Battery Replacement Date

Triggers:

  • Power interruption - Operating on battery
  • UPS Recharging - Battery is charging
  • Time Remaining Low - Macro specified threshold for alerting on a low battery
  • Time Remaining Very Low - Macro specified threshold for alerting on a critically low battery
  • 3/4/5 years gone after battery replacement

User Macros:

  • {$APC_REM_WARN} - Time remaining on battery warning value, defaults to 10 minutes
  • {$APC_REM_CRIT} - Time remaining on battery critical value, defaults to 3 minutes

Instructions:

  1. Install apcupsd using your package manager.
  2. sudo wget https://github.com/chrono-meter/zbx-apcupsd/raw/main/apcaccess-json.py -O /etc/zabbix/zabbix_agent2.d/apcaccess-json.py
  3. sudo chmod +x /etc/zabbix/zabbix_agent2.d/apcaccess-json.py
  4. sudo wget https://github.com/chrono-meter/zbx-apcupsd/raw/main/userparameter_apcupsd.conf -O /etc/zabbix/zabbix_agent2.d/userparameter_apcupsd.conf
  5. sudo systemctl restart zabbix-agent2.service
  6. Test by zabbix_get -s 127.0.0.1 -p 10050 -k "apcupsd.apcaccess"
  7. Import the template XML.
  8. Assign the template to your host.
  9. Make sure macros are at values that work for you.

zbx-apcupsd's People

Contributors

chrono-meter avatar reedacus25 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.