[Nut-upsuser] Synthesize low batt (LB) fron SNMP UPS which does not support this?
Carsten Aulbert
carsten.aulbert at aei.mpg.de
Tue May 16 13:59:39 BST 2023
Hi,
after ignoring this for too long (see [1]), I'm still struggling how to
shut down servers fed by two independent UPS systems. Both are connected
to NUT via the snmp-ups driver with mibs "huawei" and "netvision".
However, I fear both do not feature the LB warning via ups.status.
We can shut down all less important servers (conencted to a single UPS)
via upssched and a 30s timer after OB, but I still struggle hard to
arrive at a working schema how to shut down more important servers based
on remaining battery charge/projected run time and/or low batt warning.
Looking at clients/upsmon.c I think, without the flag ST_LOWBATT set for
ups->status, MINSUPPLY will never truly be considered a usable threshold
and thus I'm left with a machine which would not shutdown.
Thus, what would e the best way forward here?
* Try to patch the server to synthesize LB there? If so, any suggestion
how to do this?
* Try to patch upsmon.c's is_ups_critical method to also include extra
criteria, e.g. remaining run time/battery charge?
* Keep nut unpatched but use our own NOTIFYCMD or CMDSCRIPT to pull the
values from the server and implement our logic there?
* Another way, I've overlooked?
Cheers and thanks a ton in advance for suggestions.
Carsten
[1] Message-ID: <f794644f-e3b8-3557-da63-bd19d88a7c03 at aei.mpg.de> from
2022-12-05
--
Dr. Carsten Aulbert, Max Planck Institute for Gravitational Physics,
Callinstraße 38, 30167 Hannover, Germany, Phone +49 511 762 17185
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 4827 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://alioth-lists.debian.net/pipermail/nut-upsuser/attachments/20230516/fcfe4215/attachment.bin>
More information about the Nut-upsuser
mailing list