Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/stdevel/check_apcaccess
A Nagios / Icinga plugin for monitoring APC UPS devices using apcupsd
https://github.com/stdevel/check_apcaccess
apc apcupsd icinga icinga-plugin nagios ups
Last synced: about 1 month ago
JSON representation
A Nagios / Icinga plugin for monitoring APC UPS devices using apcupsd
- Host: GitHub
- URL: https://github.com/stdevel/check_apcaccess
- Owner: stdevel
- License: gpl-3.0
- Created: 2016-10-13T11:54:35.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2024-03-23T17:09:18.000Z (9 months ago)
- Last Synced: 2024-04-26T00:16:37.375Z (8 months ago)
- Topics: apc, apcupsd, icinga, icinga-plugin, nagios, ups
- Language: Python
- Size: 37.1 KB
- Stars: 4
- Watchers: 1
- Forks: 5
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
``check_apcaccess`` is a Nagios / Icinga plugin for checking APC UPS devices using [apcupsd](http://www.apcupsd.com).
# Requirements
The plugin requires a working apcupsd installation - see the [apcupsd online documentation](http://www.apcupsd.org/manual/manual.html) for instructions and valid configuration types.# Usage
By default, the script checks the UPS temperature, load and battery load. It is possible to control this behaviour by specifying additional parameters (*see below*).
The script also support performance data for data visualization.The following parameters can be specified:
| Parameter | Description |
|:----------|:------------|
| `-d` / `--debug` | enable debugging outputs (*default: no*) |
| `-f` / `--file` | defines the apcupsd configuration file (*default: /etc/apcupsd/apcupsd.conf*) |
| `-h` / `--help` | shows help and quits |
| `-P` / `--show-perfdata` | enables performance data (*default: no*) |
| `-w` / `--temp-warning` | defines temperature warning threshold in Celsius (*default: 50 C*) |
| `-c` / `--temp-critical` | defines temperature critical threshold in Celsius (*default: 50 C*) |
| `-l` / `--load-warning` | defines load warning threshold in percent (*default: 50%*) |
| `-L` / `--load-critical` | defines load critical threshold in percent (*default: 50%*) |
| `-b` / `--battery-warning` | defines battery load warning threshold in percent (*default: 80%*) |
| `-B` / `--battery-critical` | defines battery load critical threshold in percent (*default: 50%*) |
| `-t` / `--time-warning` | defines battery time left warning threshold in minutes (*default: empty*) |
| `-T` / `--time-critical` | defines battery time left critical threshold in minutes (*default: empty*) |
| `-u` / `--consumption-warning` | defines power consumption warning threshold in watts (*default: empty*) |
| `-U` / `--consumption-critical` | defines power consumption critical threshold in watts (*default: empty*) |
| `--version` | prints programm version and quits |## Examples
The following example checks major metrics of a connected UPS:
```
$ ./check_apcaccess.py
OK: temperature okay (34.0), load okay (39.0), battery load okay (100.0)
```Also checking battery time and power consumption:
```
$ ./check_apcaccess.py -t 20 -T 10 -u 100 -U 150
OK: temperature okay (34.0), load okay (34.0), battery load okay (100.0), battery time okay (28.0), power consumption okay (78.2)
```Reporting performance data:
```
$ ./check_apcaccess.py -P
OK: temperature okay (34.0), load okay (35.0), battery load okay (100.0) | 'consumption'=80.5 'temperature'=34.0;50.0;60.0;0.0;100.0 'load'=35.0;50.0;80.0;0.0;100.0 'battery_load'=100.0;80.0;50.0;0.0;100.0
```# Installation
To install the plugin, move the Python script into the appropriate directory and create a **NRPE configuration**.# Configuration
Inside Nagios / Icinga you will need to configure a remote check command, e.g. for NRPE:
```
#check_nrpe_apcaccess
define command{
command_name check_nrpe_apcaccess
command_line $USER1$/check_nrpe -H $HOSTADDRESS$ -c check_apcaccess -a $ARG1$
}
```Configure the check for a particular host, e.g.:
```
#DIAG: Updates
define service{
use generic-service
host_name st-ipfire02
service_description DIAG: APC UPS
check_command check_nrpe_apcaccess!-P
}
```