Several times in our articles we’ve emphasized the significance of monitoring our infrastructure closely.
This certainly applies to simple UPSs as well, in fact in the previous article we talked about how we can monitor an APC UPS even without SNMP thanks to APC-ScrapConnect.
The article ended with a cliffhanger by revealing that APC-ScrapConnect was designed to integrate with Zabbix more easily through a specific discovery function. Shall we explore this further?

Sensitive data

No, don’t worry, we’re not talking about GDPR!
The data we are interested in in the UPS area, and which we will obviously be collecting, are more or less the usual ones: input values, output values, battery status and absorbed load, to which we will then add others specific to the SmartConnect platform.

zabbix apc smartconnect collect

We always strive to get back as much as possible of what we can get back, always better to be in excess, no?

The setup

Nothing easier (I hope), we import the Template, associate it with the Host that identifies our UPS, set up the macros
{$APCSC.USER}
{$APCSC.PASSWORD}
with the login information to SmartConnect and… and done!

Automated discovery will search for the first device registered on SmartConnect that has IP equal to that of the UPS host defined in Zabbix, or alternatively, if we have multiple devices with the same IP we set the {$APC.SERIAL} macro to make discovery work by serial number.

The power of discovery

The problem you face when dealing with an undocumented platform (at the API level) is that you have no idea what data it might return to you, the most glaring example? The alerts.

How do you evaluate whether the Status value, which under normal conditions is online, when it takes on a different value should always be evaluated as a Trigger level High or not?

The answer is discovery: we periodically retrieve the platform dictionary containing all the key/value pairs present and use it in the preprocessing of some Items according to the severity that APC itself associates with the key:

  • Ongoing INFO condition
  • Ongoing WARNING condition
  • Ongoing ERROR condition

Thus we get Triggers that will be absolutely dynamic and containing the same description of APC SmartConnect platform!

For example, a SmartConnect notification like the one in the following image is translated into the Trigger Ongoing Error condition con Severity High e Operational data: Communications Lost apc smartconnect notification

Conclusions

I hope I have provided you with the necessary information to try APC-ScrapConnect on Zabbix using this Template. You can find it as usual at GitHub.
It took a fair amount of work and may not be finished here, so any feedback is welcome.