{"id":31628084,"url":"https://github.com/jirutka/apcupsd-snmp","last_synced_at":"2025-10-06T20:17:52.802Z","repository":{"id":56527874,"uuid":"2131998","full_name":"jirutka/apcupsd-snmp","owner":"jirutka","description":"Apcupsd module for Net-SNMP","archived":false,"fork":false,"pushed_at":"2019-04-28T17:15:15.000Z","size":10,"stargazers_count":42,"open_issues_count":0,"forks_count":17,"subscribers_count":8,"default_branch":"master","last_synced_at":"2024-05-08T21:07:35.066Z","etag":null,"topics":["apc","apcupsd","net-snmp","perl","snmp","ups"],"latest_commit_sha":null,"homepage":"","language":"Perl","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jirutka.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2011-07-31T10:51:23.000Z","updated_at":"2024-04-12T09:46:49.000Z","dependencies_parsed_at":"2022-08-15T20:20:50.913Z","dependency_job_id":null,"html_url":"https://github.com/jirutka/apcupsd-snmp","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/jirutka/apcupsd-snmp","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jirutka%2Fapcupsd-snmp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jirutka%2Fapcupsd-snmp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jirutka%2Fapcupsd-snmp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jirutka%2Fapcupsd-snmp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jirutka","download_url":"https://codeload.github.com/jirutka/apcupsd-snmp/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jirutka%2Fapcupsd-snmp/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278672051,"owners_count":26025826,"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","status":"online","status_checked_at":"2025-10-06T02:00:05.630Z","response_time":65,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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","net-snmp","perl","snmp","ups"],"created_at":"2025-10-06T20:17:49.928Z","updated_at":"2025-10-06T20:17:52.793Z","avatar_url":"https://github.com/jirutka.png","language":"Perl","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Net-SNMP module for apcupsd\n\nThis is Net-SNMP module for monitoring APC UPSes without SNMP support. It reads\noutput from apcupsd (/sbin/apcaccess) and writes it into appropriate OIDs like\nUPSes with built-in SNMP support.\n\n\n## Installation\n \nTo load this into a running agent with embedded Perl support turned on, simply \nput the following line to your snmpd.conf file:\n\n\tperl do \"/path/to/mod_apcupsd.pl\";\n\nNet-snmp must be compiled with Perl support and apcupsd properly configured \nand running!\n\n\n## Use\n\nTry `snmpwalk -v 2c -c public \u003chost\u003e .1.3.6.1.4.1.318.1.1.1` and you should\nget something like:\n\n\t$ snmpwalk -v 2c -c public localhost .1.3.6.1.4.1.318.1.1.1\n\tPowerNet-MIB::upsBasicIdentModel.0 = STRING: \"Back-UPS RS 500\"\n\tPowerNet-MIB::upsBasicIdentName.0 = STRING: \"grid\"\n\tPowerNet-MIB::upsAdvIdentFirmwareRevision.0 = STRING: \"30.j2.I USB FW:j2\"\n\tPowerNet-MIB::upsAdvIdentSerialNumber.0 = STRING: \"BB0314005xxx\"\n\tPowerNet-MIB::upsBasicBatteryTimeOnBattery.0 = Timeticks: (0) 0:00:00.00\n\tPowerNet-MIB::upsBasicBatteryLastReplaceDate.0 = STRING: \"2009-02-26\"\n\tPowerNet-MIB::upsAdvBatteryCapacity.0 = Gauge32: 100\n\tPowerNet-MIB::upsAdvBatteryTemperature.0 = Gauge32: 29\n\tPowerNet-MIB::upsAdvBatteryRunTimeRemaining.0 = Timeticks: (190200) 0:31:42.00\n\tPowerNet-MIB::upsAdvBatteryNominalVoltage.0 = INTEGER: 12\n\tPowerNet-MIB::upsAdvBatteryActualVoltage.0 = INTEGER: 13\n\tPowerNet-MIB::upsAdvInputLineVoltage.0 = Gauge32: 228\n\tPowerNet-MIB::upsAdvInputFrequency.0 = Gauge32: 49\n\tPowerNet-MIB::upsAdvInputLineFailCause.0 = INTEGER: blackout(4)\n\tPowerNet-MIB::upsAdvOutputVoltage.0 = Gauge32: 230\n\tPowerNet-MIB::upsAdvOutputLoad.0 = Gauge32: 22\n\tPowerNet-MIB::upsAdvConfigRatedOutputVoltage.0 = INTEGER: 230\n\tPowerNet-MIB::upsAdvConfigHighTransferVolt.0 = INTEGER: 254\n\tPowerNet-MIB::upsAdvConfigLowTransferVolt.0 = INTEGER: 198\n\tPowerNet-MIB::upsAdvConfigAlarm.0 = INTEGER: atLowBattery(2)\n\tPowerNet-MIB::upsAdvConfigMinReturnCapacity.0 = INTEGER: 0\n\tPowerNet-MIB::upsAdvConfigSensitivity.0 = INTEGER: high(4)\n\tPowerNet-MIB::upsAdvConfigLowBatteryRunTime.0 = Timeticks: (24000) 0:04:00.00\n\tPowerNet-MIB::upsAdvConfigReturnDelay.0 = Timeticks: (0) 0:00:00.00\n\tPowerNet-MIB::upsAdvConfigShutoffDelay.0 = Timeticks: (0) 0:00:00.00\n\tPowerNet-MIB::upsAdvTestDiagnosticSchedule.0 = INTEGER: unknown(1)\n\tPowerNet-MIB::upsAdvTestDiagnosticsResults.0 = INTEGER: 0\n\t\nor if you like numeric OIDs:\n\n\tsnmpwalk -v 2c -c public -On localhost .1.3.6.1.4.1.318.1.1.1\n\t.1.3.6.1.4.1.318.1.1.1.1.1.1.0 = STRING: \"Back-UPS RS 500\"\n\t.1.3.6.1.4.1.318.1.1.1.1.1.2.0 = STRING: \"grid\"\n\t.1.3.6.1.4.1.318.1.1.1.1.2.1.0 = STRING: \"30.j2.I USB FW:j2\"\n\t.1.3.6.1.4.1.318.1.1.1.1.2.3.0 = STRING: \"BB0314005xxx\"\n\t.1.3.6.1.4.1.318.1.1.1.2.1.2.0 = Timeticks: (0) 0:00:00.00\n\t.1.3.6.1.4.1.318.1.1.1.2.1.3.0 = STRING: \"2009-02-26\"\n\t.1.3.6.1.4.1.318.1.1.1.2.2.1.0 = Gauge32: 100\n\t.1.3.6.1.4.1.318.1.1.1.2.2.2.0 = Gauge32: 29\n\t.1.3.6.1.4.1.318.1.1.1.2.2.3.0 = Timeticks: (184800) 0:30:48.00\n\t.1.3.6.1.4.1.318.1.1.1.2.2.7.0 = INTEGER: 12\n\t.1.3.6.1.4.1.318.1.1.1.2.2.8.0 = INTEGER: 13\n\t.1.3.6.1.4.1.318.1.1.1.3.2.1.0 = Gauge32: 228\n\t.1.3.6.1.4.1.318.1.1.1.3.2.4.0 = Gauge32: 49\n\t.1.3.6.1.4.1.318.1.1.1.3.2.5.0 = INTEGER: blackout(4)\n\t.1.3.6.1.4.1.318.1.1.1.4.2.1.0 = Gauge32: 230\n\t.1.3.6.1.4.1.318.1.1.1.4.2.3.0 = Gauge32: 21\n\t.1.3.6.1.4.1.318.1.1.1.5.2.1.0 = INTEGER: 230\n\t.1.3.6.1.4.1.318.1.1.1.5.2.2.0 = INTEGER: 254\n\t.1.3.6.1.4.1.318.1.1.1.5.2.3.0 = INTEGER: 198\n\t.1.3.6.1.4.1.318.1.1.1.5.2.4.0 = INTEGER: atLowBattery(2)\n\t.1.3.6.1.4.1.318.1.1.1.5.2.6.0 = INTEGER: 0\n\t.1.3.6.1.4.1.318.1.1.1.5.2.7.0 = INTEGER: high(4)\n\t.1.3.6.1.4.1.318.1.1.1.5.2.8.0 = Timeticks: (24000) 0:04:00.00\n\t.1.3.6.1.4.1.318.1.1.1.5.2.9.0 = Timeticks: (0) 0:00:00.00\n\t.1.3.6.1.4.1.318.1.1.1.5.2.10.0 = Timeticks: (0) 0:00:00.00\n\t.1.3.6.1.4.1.318.1.1.1.7.2.1.0 = INTEGER: unknown(1)\n\t.1.3.6.1.4.1.318.1.1.1.7.2.3.0 = INTEGER: 0\n\nYou can also query only one OID:\n\n\t$ snmpwalk -v 2c -c public grid .1.3.6.1.4.1.318.1.1.1.2.2.3.0\n\tPowerNet-MIB::upsAdvBatteryRunTimeRemaining.0 = Timeticks: (190200) 0:31:42.00\n\t\n\n## What can be improved\n\n* Reimplement snmp_handler to correctly support walking through subtrees of \n.1.3.6.1.4.1.318.1.1.1 (e.g. .1.3.6.1.4.1.318.1.1.1.2). Currently it can \nlist subtrees only on .1.3.6.1.4.1.318.1.1.1 and leafs.\n\n* Add remaining OIDs that apcupsd could get data for. I included only OIDs for \nmy APC Back-UP RS 500.\n\n* Implement support for setting values and traps.\n\n*Feel free to contribute!* I have no intention in future development.\n\n\n## Important notes\n\n* Download PowerNet (APC) MIB file: \n[powernet401.mib](http://www.michaelfmcnamara.com/files/mibs/powernet401.mib).\n\n* I'm not skilled Perl programmer, this is my first Perl script I ever wrote.\nSo if you find something weird in it, please let me know about it and fix it.\nHowever it's working perfectly fine for me, so I hope it's ok.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjirutka%2Fapcupsd-snmp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjirutka%2Fapcupsd-snmp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjirutka%2Fapcupsd-snmp/lists"}