{"id":19044529,"url":"https://github.com/stdevel/check_apcaccess","last_synced_at":"2025-04-23T23:28:28.368Z","repository":{"id":44078138,"uuid":"70801603","full_name":"stdevel/check_apcaccess","owner":"stdevel","description":"A Nagios / Icinga plugin for monitoring APC UPS devices using apcupsd","archived":false,"fork":false,"pushed_at":"2024-03-23T17:09:18.000Z","size":38,"stargazers_count":4,"open_issues_count":6,"forks_count":5,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-18T08:39:30.885Z","etag":null,"topics":["apc","apcupsd","icinga","icinga-plugin","nagios","ups"],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/stdevel.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2016-10-13T11:54:35.000Z","updated_at":"2023-12-28T10:18:22.000Z","dependencies_parsed_at":"2024-03-23T18:25:06.157Z","dependency_job_id":"77fc4a8a-ba9f-477c-947c-4b8de172c977","html_url":"https://github.com/stdevel/check_apcaccess","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stdevel%2Fcheck_apcaccess","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stdevel%2Fcheck_apcaccess/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stdevel%2Fcheck_apcaccess/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stdevel%2Fcheck_apcaccess/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/stdevel","download_url":"https://codeload.github.com/stdevel/check_apcaccess/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250531162,"owners_count":21445933,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["apc","apcupsd","icinga","icinga-plugin","nagios","ups"],"created_at":"2024-11-08T22:46:33.342Z","updated_at":"2025-04-23T23:28:28.330Z","avatar_url":"https://github.com/stdevel.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"``check_apcaccess`` is a Nagios / Icinga plugin for checking APC UPS devices using [apcupsd](http://www.apcupsd.com).\n\n# Requirements\nThe plugin requires a working apcupsd installation - see the [apcupsd online documentation](http://www.apcupsd.org/manual/manual.html) for instructions and valid configuration types.\n\n# Usage\nBy default, the script checks the UPS temperature, load and battery load. It is possible to control this behaviour by specifying additional parameters (*see below*).\nThe script also support performance data for data visualization.\n\nThe following parameters can be specified:\n\n| Parameter | Description |\n|:----------|:------------|\n| `-d` / `--debug` | enable debugging outputs (*default: no*) |\n| `-f` / `--file` | defines the apcupsd configuration file (*default: /etc/apcupsd/apcupsd.conf*) |\n| `-h` / `--help` | shows help and quits |\n| `-P` / `--show-perfdata` | enables performance data (*default: no*) |\n| `-w` / `--temp-warning` | defines temperature warning threshold in Celsius (*default: 50 C*) |\n| `-c` / `--temp-critical` | defines temperature critical threshold in Celsius (*default: 50 C*) |\n| `-l` / `--load-warning` | defines load warning threshold in percent (*default: 50%*) |\n| `-L` / `--load-critical` | defines load critical threshold in percent (*default: 50%*) |\n| `-b` / `--battery-warning` | defines battery load warning threshold in percent (*default: 80%*) |\n| `-B` / `--battery-critical` | defines battery load critical threshold in percent (*default: 50%*) |\n| `-t` / `--time-warning` | defines battery time left warning threshold in minutes (*default: empty*) |\n| `-T` / `--time-critical` | defines battery time left critical threshold in minutes (*default: empty*) |\n| `-u` / `--consumption-warning` | defines power consumption warning threshold in watts (*default: empty*) |\n| `-U` / `--consumption-critical` | defines power consumption critical threshold in watts (*default: empty*) |\n| `--version` | prints programm version and quits |\n\n## Examples\nThe following example checks major metrics of a connected UPS:\n```\n$ ./check_apcaccess.py\nOK: temperature okay (34.0), load okay (39.0), battery load okay (100.0)\n```\n\nAlso checking battery time and power consumption:\n```\n$ ./check_apcaccess.py -t 20 -T 10 -u 100 -U 150\nOK: temperature okay (34.0), load okay (34.0), battery load okay (100.0), battery time okay (28.0), power consumption okay (78.2)\n```\n\nReporting performance data:\n```\n$ ./check_apcaccess.py -P\nOK: 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\n```\n\n# Installation\nTo install the plugin, move the Python script into the appropriate directory and create a **NRPE configuration**.\n\n# Configuration\nInside Nagios / Icinga you will need to configure a remote check command, e.g. for NRPE:\n```\n#check_nrpe_apcaccess\ndefine command{\n    command_name        check_nrpe_apcaccess\n    command_line        $USER1$/check_nrpe -H $HOSTADDRESS$ -c check_apcaccess -a $ARG1$\n}\n```\n\nConfigure the check for a particular host, e.g.:\n```\n#DIAG: Updates\ndefine service{\n        use                             generic-service\n        host_name                       st-ipfire02\n        service_description             DIAG: APC UPS\n        check_command                   check_nrpe_apcaccess!-P\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstdevel%2Fcheck_apcaccess","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstdevel%2Fcheck_apcaccess","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstdevel%2Fcheck_apcaccess/lists"}