|Sergey Morozov 12d0abf288||1 year ago|
|README.md||1 year ago|
|registerups.cfg.example||1 year ago|
|registerups.py||1 year ago|
By using SNMP protocol, we can monitor an UPS state and shutdown a hosts connected to the UPS without using a proprietary Cyber Power software. But, some features works only with Power Panel software. For example, SNMP card can send signal to the Power Panel clients when UPS performs scheduled shutdown. In this case we can handle SNMP trap from SNMP card to shutdown non- Power Panel clients. But if there are no Power Panel clients, UPS not sends signal, and not sends an SNMP trap. Therefore, if we whant to shutdown SNMP clients correctly, we should install at least one Power Panel client. Or we can use a registerups python script to register a host on the ups without using a Power Panel.
Place a configuration file to the preffered location (e.g. to the /etc directory) and edit it. You can use a provided example. Path to the configuration file is the first argument to the registerups.py script. You shold setup cron to periodically update host registration.
Example for update registration every 5 minutes:
*/5 * * * * nobody /usr/local/bin/registerups.py /etc/registerups.cfg