You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is more of an enhancement request, but I think it's also a bit of an issue considering alarms can have consequences.
In the current codebase various drivers utilize ups.alarm for raising device-/manufacturer-specific alarms. There is additional common code in dstate.c, evaluating if such ups.alarm variables are preset and, if so, set a status ALARM:
Right now, in an unattended setting, specifically checking the UPS status and UPS variables for active alarms seems needed. This is because at present upsmon seems to have no specific code handling an ALARM status and hence it cannot be acted on with upssched or other means of notification processing. As the drivers seem to already be handling alarms one way or another, and this is unified by dstate.c with a status ALARM as common denominator, uspmon code seems to be the remaining piece of the puzzle to actively be able to handle and act on alarms and an associated ALARM status of the UPS.
We should introduce upsmon code with a flag ST_ALARM and associated NOTIFY_ALARM & NOTIFY_NOALARM for the user to be able to act on ALARM. Such code residing in upsmon would make sense to process an ALARM status (as set by dstate.c) as a common denominator for different ways of handling alarms within the UPS drivers themselves. UPS alarms can raise potentially grave issues of the UPS and users should be able to configure e.g. upssched tasks or notifiers accordingly:
NOTIFYFLAG ALARM EXEC
NOTIFYFLAG NOTALARM EXEC
ALARM being when the ALARM status is set on the UPS NOTALARM being when the ALARM status is no longer set on the UPS
Ideally this could be accompanied by respective SYSLOG warning messages with the specific alarm message, both when set and later removed again by the UPS driver, although this might require more advanced tracking of the individual alarms and is possibly overkill as opposed to handling a simple if (flag_isset(ups->status, ST_ALARM).
UPS %s is now in status ALARM (first-time) with message: %s.
UPS %s is no longer in status ALARM, all alarms have cleared.
The text was updated successfully, but these errors were encountered:
This is more of an enhancement request, but I think it's also a bit of an issue considering alarms can have consequences.
In the current codebase various drivers utilize
ups.alarm
for raising device-/manufacturer-specific alarms. There is additional common code indstate.c
, evaluating if suchups.alarm
variables are preset and, if so, set a statusALARM
:nut/drivers/dstate.c
Lines 1696 to 1700 in 539d970
Right now, in an unattended setting, specifically checking the UPS status and UPS variables for active alarms seems needed. This is because at present
upsmon
seems to have no specific code handling anALARM
status and hence it cannot be acted on withupssched
or other means of notification processing. As the drivers seem to already be handling alarms one way or another, and this is unified bydstate.c
with a statusALARM
as common denominator,uspmon
code seems to be the remaining piece of the puzzle to actively be able to handle and act on alarms and an associatedALARM
status of the UPS.We should introduce
upsmon
code with a flagST_ALARM
and associatedNOTIFY_ALARM
&NOTIFY_NOALARM
for the user to be able to act onALARM
. Such code residing inupsmon
would make sense to process anALARM
status (as set bydstate.c
) as a common denominator for different ways of handling alarms within the UPS drivers themselves. UPS alarms can raise potentially grave issues of the UPS and users should be able to configure e.g.upssched
tasks or notifiers accordingly:ALARM
being when theALARM
status is set on the UPSNOTALARM
being when theALARM
status is no longer set on the UPSIdeally this could be accompanied by respective SYSLOG warning messages with the specific alarm message, both when set and later removed again by the UPS driver, although this might require more advanced tracking of the individual alarms and is possibly overkill as opposed to handling a simple
if (flag_isset(ups->status, ST_ALARM)
.The text was updated successfully, but these errors were encountered: