UPS Monitoring Plugin for Cacti Released
Moderators: Developers, Moderators
- TheWitness
- Developer
- Posts: 17007
- Joined: Tue May 14, 2002 5:08 pm
- Location: MI, USA
- Contact:
UPS Monitoring Plugin for Cacti Released
All,
I've been spending my off hours recently working on a plugin that allows monitoring of Uninterruptible Power Supplies (UPSes) inside of Cacti.
With the release of Cacti 1.2.24, we have also released that plugin. If you have any UPSes either SNMP or APCUPSD based and would like to monitor them from Cacti, please feed free to download, test and report any issues you have.
APCUPSD is the preferred method, and any UPS that you can monitor using APCUPSD, you can monitor with Cacti. Your Cacti server will need to have APCUPSD's apcaccess command installed to gather the statistics.
We would be interested in any things you find lacking in the plugin and any new ideas to go beyond what is already planned for future release. You can share those thoughts in the GitHub issue tracker and discussion on GitHub.
Download Location: https://github.com/cacti/plugin_apcupsd
Screen shots to follow:
I've been spending my off hours recently working on a plugin that allows monitoring of Uninterruptible Power Supplies (UPSes) inside of Cacti.
With the release of Cacti 1.2.24, we have also released that plugin. If you have any UPSes either SNMP or APCUPSD based and would like to monitor them from Cacti, please feed free to download, test and report any issues you have.
APCUPSD is the preferred method, and any UPS that you can monitor using APCUPSD, you can monitor with Cacti. Your Cacti server will need to have APCUPSD's apcaccess command installed to gather the statistics.
We would be interested in any things you find lacking in the plugin and any new ideas to go beyond what is already planned for future release. You can share those thoughts in the GitHub issue tracker and discussion on GitHub.
Download Location: https://github.com/cacti/plugin_apcupsd
Screen shots to follow:
- Attachments
-
- APCUPSD1.png (116.72 KiB) Viewed 9276 times
-
- APCUPSD2.png (126.4 KiB) Viewed 9276 times
True understanding begins only when we realize how little we truly understand...
Life is an adventure, let yours begin with Cacti!
Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages
For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
Life is an adventure, let yours begin with Cacti!
Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages
For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
Re: UPS Monitoring Plugin for Cacti Released
This looks fantastic. I'm not familiar with APCUPSD (most of my experience is with NUT) and not all of my hardware is APC.
Looking at the code superficially; Do you think it's viable to do a NUT-based adaptation? I wouldn't expect this from you, however having laid the foundation I see a bunch of items that look like they could be converted to the NUT-based commands and get the same data.
Without digging in deeply I can't easily tell how much is using features in apcupsd that couldn't be easily adapted to another service providing the same/similar data.
Edit: Nevermind, got around to reading the readme Apologies.
That said; I've installed it and configured it for a couple of my APCs. I need to figure out how to allow remote access to the apcupsd but other than that, I should be able to report back anything I find.
Thanks for the plugin!
Looking at the code superficially; Do you think it's viable to do a NUT-based adaptation? I wouldn't expect this from you, however having laid the foundation I see a bunch of items that look like they could be converted to the NUT-based commands and get the same data.
Without digging in deeply I can't easily tell how much is using features in apcupsd that couldn't be easily adapted to another service providing the same/similar data.
Edit: Nevermind, got around to reading the readme Apologies.
That said; I've installed it and configured it for a couple of my APCs. I need to figure out how to allow remote access to the apcupsd but other than that, I should be able to report back anything I find.
Thanks for the plugin!
Re: UPS Monitoring Plugin for Cacti Released
Quick follow-up;
I see my UPS', the older units seem to have all the data, but the newer ones are missing data, however it doesn't appear in APCUPSD, so that's not on the plugin.
However; It looks like the plugin was supposed to create devices and graph the data? Maybe? However, none of these UPS' have matching devices created. I also checked the rra path and there's not been a new directory created.
I see my UPS', the older units seem to have all the data, but the newer ones are missing data, however it doesn't appear in APCUPSD, so that's not on the plugin.
However; It looks like the plugin was supposed to create devices and graph the data? Maybe? However, none of these UPS' have matching devices created. I also checked the rra path and there's not been a new directory created.
- TheWitness
- Developer
- Posts: 17007
- Joined: Tue May 14, 2002 5:08 pm
- Location: MI, USA
- Contact:
Re: UPS Monitoring Plugin for Cacti Released
Jeeves,
I've been taking a break from Cacti and just saw this. Did you import the device package and enable the auto-creation of the devices? Also, for this problematic UPS, can you post the content of the command apcaccess on the host monitoring the UPS?
Larry
I've been taking a break from Cacti and just saw this. Did you import the device package and enable the auto-creation of the devices? Also, for this problematic UPS, can you post the content of the command apcaccess on the host monitoring the UPS?
Larry
True understanding begins only when we realize how little we truly understand...
Life is an adventure, let yours begin with Cacti!
Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages
For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
Life is an adventure, let yours begin with Cacti!
Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages
For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
Re: UPS Monitoring Plugin for Cacti Released
Good Afternoon Larry,TheWitness wrote: ↑Sat Jan 27, 2024 7:47 pm Jeeves,
I've been taking a break from Cacti and just saw this. Did you import the device package and enable the auto-creation of the devices? Also, for this problematic UPS, can you post the content of the command apcaccess on the host monitoring the UPS?
Larry
I totally missed the line in the installation markdown about importing the device package. I saw "install like any other plugin" then my eyes glazed over and clearly missed that. I'll go back, import it and I'm sure it will fix the issue. As a safety-belt feature, it might be useful for the plugin to check if the templates exists (in some way) and alert the user that they've been a dummy and skipped a step?
Also; It seems that if I select anything other than "autocreate device on first poll" I cannot re-select "autocreate device on first poll", e.g. if I select "None" then change my mind.
As for the UPS;
vs. One of the Smart-UPS 1000's;APC : 001,027,0658
DATE : 2024-02-01 16:20:35 -0600
HOSTNAME : upsmon
VERSION : 3.14.14 (31 May 2016) debian
UPSNAME : Unit4
CABLE : USB Cable
DRIVER : USB UPS Driver
UPSMODE : Stand Alone
STARTTIME: 2024-01-25 18:03:56 -0600
MODEL : Smart-UPS 1500
STATUS : ONLINE
BCHARGE : 100.0 Percent
TIMELEFT : 6.0 Minutes
MBATTCHG : -1 Percent
MINTIMEL : -1 Minutes
MAXTIME : 0 Seconds
ALARMDEL : 30 Seconds
BATTV : 27.3 Volts
NUMXFERS : 0
TONBATT : 0 Seconds
CUMONBATT: 0 Seconds
XOFFBATT : N/A
STATFLAG : 0x05000008
MANDATE : 2014-12-04
SERIALNO : AS1449221212
NOMBATTV : 24.0 Volts
FIRMWARE : UPS 09.2 / ID=18
END APC : 2024-02-01 16:20:48 -0600
I do not know why those values are not listed/available/etc. But it seemed like that would impact any devices created.APC : 001,043,1011
DATE : 2024-02-01 16:22:02 -0600
HOSTNAME : upsmon
VERSION : 3.14.14 (31 May 2016) debian
UPSNAME : Unit2
CABLE : USB Cable
DRIVER : USB UPS Driver
UPSMODE : Stand Alone
STARTTIME: 2024-01-25 18:03:56 -0600
MODEL : Smart-UPS 1000 RM
STATUS : ONLINE
LINEV : 119.5 Volts
LOADPCT : 59.1 Percent
BCHARGE : 100.0 Percent
TIMELEFT : 6.0 Minutes
MBATTCHG : -1 Percent
MINTIMEL : -1 Minutes
MAXTIME : 0 Seconds
OUTPUTV : 119.5 Volts
SENSE : High
DWAKE : -1 Seconds
DSHUTD : 90 Seconds
LOTRANS : 106.0 Volts
HITRANS : 127.0 Volts
RETPCT : 0.0 Percent
ITEMP : 28.8 C
ALARMDEL : 30 Seconds
BATTV : 27.5 Volts
LINEFREQ : 60.0 Hz
LASTXFER : No transfers since turnon
NUMXFERS : 0
TONBATT : 0 Seconds
CUMONBATT: 0 Seconds
XOFFBATT : N/A
SELFTEST : NO
STESTI : 14 days
STATFLAG : 0x05000008
MANDATE : 2010-05-09
SERIALNO : AS1020110302
BATTDATE : 2010-05-09
NOMOUTV : 120 Volts
NOMBATTV : 24.0 Volts
FIRMWARE : 669.19.D USB FW:11.
END APC : 2024-02-01 16:22:23 -0600
- TheWitness
- Developer
- Posts: 17007
- Joined: Tue May 14, 2002 5:08 pm
- Location: MI, USA
- Contact:
Re: UPS Monitoring Plugin for Cacti Released
Okay, that was funny. Like any other plugin "except". I think we've both been doing this too long. Anyway, I'll take that output and see if it works for me. Also, that 1500 gives almost no information. APC/Schneider has been de-contenting their UPS' from a reporting perspective. They may have also changed the USB addresses. That'll be a pain and require a bumping of the apcupsd which has not had an update for a while. If you connect it to a Windows box with their power chute installed, do you get more information?
When you run apcaccess from the Cacti host to the host and port, are you getting the same information?
When you run apcaccess from the Cacti host to the host and port, are you getting the same information?
True understanding begins only when we realize how little we truly understand...
Life is an adventure, let yours begin with Cacti!
Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages
For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
Life is an adventure, let yours begin with Cacti!
Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages
For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
Re: UPS Monitoring Plugin for Cacti Released
Silly GOTCHAs!TheWitness wrote: ↑Thu Feb 01, 2024 6:35 pm Okay, that was funny. Like any other plugin "except". I think we've both been doing this too long.
I imported the package, all was successful, but I still do not see any devices being created.
I'm not sure if that is expected because I flubbed the install, or whatnot.
I am offisite at the moment, but next week I'll test with powerchute. I did test it with my NUT instance, and I believe the same data was retrieved, so I was satisfied that it wasn't a apcupsd issue, but rather a limitation by design. I'll pull out the laptop I was working on at the time and check, I'm sure I kept that data.TheWitness wrote: ↑Thu Feb 01, 2024 6:35 pmAnyway, I'll take that output and see if it works for me. Also, that 1500 gives almost no information. APC/Schneider has been de-contenting their UPS' from a reporting perspective.
The same data is received both locally and remotely.When you run apcaccess from the Cacti host to the host and port, are you getting the same information?
Re: UPS Monitoring Plugin for Cacti Released
Here's the data from NUT gathered from the same Smart-UPS 1500:
battery.charge: 100
battery.charge.low: 10
battery.charge.warning: 50
battery.runtime: 360
battery.runtime.low: 120
battery.type: PbAc
battery.voltage: 27.3
battery.voltage.nominal: 24.0
device.mfr: American Power Conversion
device.model: Smart-UPS 1500
device.serial: AS144xxxxx
device.type: ups
driver.name: usbhid-ups
driver.parameter.bus: 001
driver.parameter.pollfreq: 30
driver.parameter.pollinterval: 2
driver.parameter.port: auto
driver.parameter.product: Smart-UPS 1500 FW:UPS 09.2 / ID=18
driver.parameter.productid: 0003
driver.parameter.serial: AS144xxxxxx
driver.parameter.synchronous: auto
driver.parameter.vendor: American Power Conversion
driver.parameter.vendorid: 051D
driver.version: 2.8.0
driver.version.data: APC HID 0.98
driver.version.internal: 0.47
driver.version.usb: libusb-1.0.26 (API: 0x1000109)
ups.beeper.status: enabled
ups.delay.shutdown: 20
ups.firmware: UPS 09.2 / ID=18
ups.mfr: American Power Conversion
ups.mfr.date: 2014/12/04
ups.model: Smart-UPS 1500
ups.productid: 0003
ups.serial: AS144xxxxxx
ups.status: OL
ups.timer.reboot: -1
ups.timer.shutdown: -1
ups.vendorid: 051d
-
- Posts: 1
- Joined: Sat Sep 07, 2024 1:36 pm
Re: UPS Monitoring Plugin for Cacti Released
Followed your work on here for MANY years, yet another very cool addition. Struggling a bit to get this to work and not sure how to troubleshoot further than I already have.
CentOS 9 / Cacti 1.2.27
Device - pfsense with apcuspd package
I can query apcaccess from cacti's console but adding the ups in actual Cacti / UPSes it successfully adds but get unknown as status and no graphs created. I have gone over the read.me several times.
ATM unfortunately this is the only APC UPS I have to work with.
From Cacti Host:
Last login: Fri Sep 6 19:49:28 2024 from 172.31.250.190
[root@cacti ~]# apcaccess -h 172.31.250.1:3551
APC : 001,034,0839
DATE : 2024-09-07 11:24:56 -0700
HOSTNAME : pfSense.canyon.local
VERSION : 3.14.14 (31 May 2016) freebsd
UPSNAME : apc550
CABLE : USB Cable
DRIVER : USB UPS Driver
UPSMODE : Stand Alone
STARTTIME: 2024-09-06 15:26:31 -0700
MODEL : Back-UPS ES 550
STATUS : ONLINE
LINEV : 118.0 Volts
LOADPCT : 67.0 Percent
BCHARGE : 100.0 Percent
TIMELEFT : 6.2 Minutes
MBATTCHG : 20 Percent
MINTIMEL : 1 Minutes
MAXTIME : 0 Seconds
SENSE : Medium
LOTRANS : 92.0 Volts
HITRANS : 139.0 Volts
ALARMDEL : 30 Seconds
BATTV : 13.4 Volts
LASTXFER : Low line voltage
NUMXFERS : 0
TONBATT : 0 Seconds
CUMONBATT: 0 Seconds
XOFFBATT : N/A
STATFLAG : 0x05000008
SERIALNO : 4B0950P72373
BATTDATE : 2009-12-14
NOMINV : 120 Volts
NOMBATTV : 12.0 Volts
FIRMWARE : 843.K2 .D USB FW:K2
END APC : 2024-09-07 11:25:46 -0700
[root@cacti ~]#
CentOS 9 / Cacti 1.2.27
Device - pfsense with apcuspd package
I can query apcaccess from cacti's console but adding the ups in actual Cacti / UPSes it successfully adds but get unknown as status and no graphs created. I have gone over the read.me several times.
ATM unfortunately this is the only APC UPS I have to work with.
From Cacti Host:
Last login: Fri Sep 6 19:49:28 2024 from 172.31.250.190
[root@cacti ~]# apcaccess -h 172.31.250.1:3551
APC : 001,034,0839
DATE : 2024-09-07 11:24:56 -0700
HOSTNAME : pfSense.canyon.local
VERSION : 3.14.14 (31 May 2016) freebsd
UPSNAME : apc550
CABLE : USB Cable
DRIVER : USB UPS Driver
UPSMODE : Stand Alone
STARTTIME: 2024-09-06 15:26:31 -0700
MODEL : Back-UPS ES 550
STATUS : ONLINE
LINEV : 118.0 Volts
LOADPCT : 67.0 Percent
BCHARGE : 100.0 Percent
TIMELEFT : 6.2 Minutes
MBATTCHG : 20 Percent
MINTIMEL : 1 Minutes
MAXTIME : 0 Seconds
SENSE : Medium
LOTRANS : 92.0 Volts
HITRANS : 139.0 Volts
ALARMDEL : 30 Seconds
BATTV : 13.4 Volts
LASTXFER : Low line voltage
NUMXFERS : 0
TONBATT : 0 Seconds
CUMONBATT: 0 Seconds
XOFFBATT : N/A
STATFLAG : 0x05000008
SERIALNO : 4B0950P72373
BATTDATE : 2009-12-14
NOMINV : 120 Volts
NOMBATTV : 12.0 Volts
FIRMWARE : 843.K2 .D USB FW:K2
END APC : 2024-09-07 11:25:46 -0700
[root@cacti ~]#
- TheWitness
- Developer
- Posts: 17007
- Joined: Tue May 14, 2002 5:08 pm
- Location: MI, USA
- Contact:
Re: UPS Monitoring Plugin for Cacti Released
Did you import the device package?
True understanding begins only when we realize how little we truly understand...
Life is an adventure, let yours begin with Cacti!
Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages
For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
Life is an adventure, let yours begin with Cacti!
Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages
For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
-
- Posts: 3
- Joined: Wed Jul 18, 2012 7:59 am
Re: UPS Monitoring Plugin for Cacti Released
Hello,
i have setup Cacti 1.2.27 on Rocky 9 today, moved from my old installation 0.8.8b.
I have setup the plugin as described, but get no Data.
It stuck at the same point as gravystain5312 states.
I have installed the device package "UPS_APC_UPSD_Device.xml.gz" via the instructions from the github.
As i see in tcpdump, apcaccess is newer try to reach the apcupsd host via IP.
Here is some output from the cacti.log:
2024-11-01 20:40:29 - SYSTEM STATS: Time:27.5655 Method:cmd.php Processes:4 Threads:1 Hosts:9 HostsPerProcess:3 DataSources:401 RRDsProcessed:259
2024-11-01 20:40:29 - SYSTEM MAINT STATS: Time:0.00
2024-11-01 20:40:29 - SYSTEM APCUPSD STATS: Time:0.00 UPSDUPSes:0 SNMPUPSes:0
But for sure, i have configured one UPS .
i have setup Cacti 1.2.27 on Rocky 9 today, moved from my old installation 0.8.8b.
I have setup the plugin as described, but get no Data.
It stuck at the same point as gravystain5312 states.
I have installed the device package "UPS_APC_UPSD_Device.xml.gz" via the instructions from the github.
As i see in tcpdump, apcaccess is newer try to reach the apcupsd host via IP.
Here is some output from the cacti.log:
2024-11-01 20:40:29 - SYSTEM STATS: Time:27.5655 Method:cmd.php Processes:4 Threads:1 Hosts:9 HostsPerProcess:3 DataSources:401 RRDsProcessed:259
2024-11-01 20:40:29 - SYSTEM MAINT STATS: Time:0.00
2024-11-01 20:40:29 - SYSTEM APCUPSD STATS: Time:0.00 UPSDUPSes:0 SNMPUPSes:0
But for sure, i have configured one UPS .
Who is online
Users browsing this forum: No registered users and 0 guests