[Nut-upsdev] When it rains, it pours

Jim Klimov jimklimov at gmail.com
Thu Sep 14 22:01:16 BST 2023


Hello fellow NUTs :)

  Found myself discussing two issues today, both around different aspects
of our `upsname[@hostname[:port]]` handling. One was actually a bug, should
be fixed after its PR passes the checks and gets merged, another is up for
another round of community brainstorming, raised in
https://github.com/networkupstools/nut/issues/2044 :

  Would it make sense to somehow extend this naming pattern (and how) to
allow specifying outlet (group) numbers? For example:

    upsname[@hostname[:port]][#outlet]

  The idea here is that we have devices with manageable subsets of power
load - e.g. groups of outlets on larger UPSes, or individual sockets on
smart ePDUs. Currently NUT has a notion of a power device being
OL=>OB=>LB... and that's it. It seems that upsmon does not have a concept
yet for a device that is still manageable and reports its state as "OFF"
(which is what issue @2044 is originally about). If there was an outage,
upsmon knows to consider the device dead after some criteria happen, and
for MONITOR lines involved - deduct the amount of fed power sources to
compare with MINSUPPLIES. If however an administrator turned off the UPS
load, so the USB or SNMP device still responds and says its status is OFF,
upsmon has no reason yet to believe it is not on - there was no outage, etc.

  The next logical step however is that once we fix the use-case whole
device being off, there is also a use-case of its sub-set being off (the
manageable outlets/groups). So the UPS overall says it is ON, but its group
feeding a PSU of our server can be OFF and the server's upsmon should treat
it as a known minus-one fed PSU. This in turn needs that we have a way to
specify which UPS/PDU outlet/group status is important for *this*
particular server in *its* upsmon.conf, and the least-invasive idea I have
is to extend the "upsname..." token format, such as by example above.

  WDYT?

  NOTE: PRs to implement these ideas would be also welcome :)

Jim Klimov
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/nut-upsdev/attachments/20230914/c0bf3dd0/attachment.htm>


More information about the Nut-upsdev mailing list