Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update upsmon ALARM support and related themes from issue #415 #2709

Merged
merged 34 commits into from
Dec 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
d4a6263
upsmon: add support for alarms
arnaudquette-eaton Apr 4, 2017
f7de20a
upsstats (CGI): add support for alarms
arnaudquette-eaton Apr 4, 2017
fc80a94
Merge remote-tracking branch 'upstream/upsmon_alarm' into issue-415
jimklimov Dec 3, 2024
7f314af
clients/upsmon.{c,h}, docs, conf: apply suggestions from issue #415 d…
jimklimov Dec 3, 2024
c85e741
drivers/usbhid-ups.c, drivers/netxml-ups.c, NEWS.adoc, UPGRADING.adoc…
jimklimov Dec 3, 2024
97c6838
clients/upsmon.c, NEWS.adoc: optimize parse_status() by not checking …
jimklimov Dec 3, 2024
c7c0a83
clients/upsmon.{c,h}, NEWS.adoc: revise do_notify() to allow passing …
jimklimov Dec 3, 2024
6bf775c
upsmon code, docs, conf: introduce "OTHER"/"NOTOTHER" notifications f…
jimklimov Dec 3, 2024
32fcb3f
docs/new-drivers.txt: in "Status data", stress the life-cycle of `ups…
jimklimov Dec 3, 2024
04087cc
clients/upsmon.c: allow to get_var(ups, "alarm"...) and use it in ups…
jimklimov Dec 3, 2024
380b3e4
clients/upsmon.c: ups_is_alarm(): track if ups.alarm value changed, r…
jimklimov Dec 3, 2024
1ac8b9a
clients/upsmon.h, docs: default "ALARM" message format to two "%s" pl…
jimklimov Dec 3, 2024
d6f2e81
Merge branch 'master' into issue-415
jimklimov Dec 4, 2024
07e9a0b
Merge branch 'master' into issue-415
jimklimov Dec 4, 2024
d4c361d
conf/upsmon.conf.sample.in: suggest NOTIFYFLAG for OTHER/NOTOTHER too…
jimklimov Dec 5, 2024
25dcfab
scripts/misc/notifyme-debug: honour TEMPDIR or TMPDIR set by caller; …
jimklimov Dec 5, 2024
5af374d
tests/NIT/Makefile.am: allow to pass custom NUT_PORT and NIT_CASE [#2…
jimklimov Dec 5, 2024
0f81a75
tests/NIT/nit.sh: testcase_sandbox_upsc_query_timer(): add a retry wi…
jimklimov Dec 5, 2024
3d63a05
tests/NIT/nit.sh: generatecfg_upsmon_trivial(): refer to NOTIFYCMD=..…
jimklimov Dec 5, 2024
3d6ccd8
common/common.c: refactor upsnotify_suggest_NUT_QUIET_INIT_UPSNOTIFY_…
jimklimov Dec 5, 2024
66a4c31
common/common.c: debug-log isPreparingForSleep() outcomes (when extre…
jimklimov Dec 5, 2024
a6496a6
common/common.c: only close_sdbus_once() if we are the same PID that …
jimklimov Dec 5, 2024
8fa18c0
clients/upsmon.c: break the main sub-loop where we check sleep_inhibi…
jimklimov Dec 5, 2024
a1125ab
clients/upsmon.c: report start/end/duration of the "sleepval" delay b…
jimklimov Dec 5, 2024
de0e1c6
clients/upsmon.c: change time maths in delay between main loop cycles…
jimklimov Dec 5, 2024
c9dac61
clients/upsmon.c: notify(): clarify (when debug-logging) upsmon-centr…
jimklimov Dec 5, 2024
9af439d
clients/upsmon.c: parse_status(): fix releasing of ups->status_tokens…
jimklimov Dec 5, 2024
50965c0
clients/upsmon.c: redefine_ups(): comment a concern about "pv" changes
jimklimov Dec 6, 2024
a36bc24
clients/upsmon.c: addups(): start with definitive states of all fields
jimklimov Dec 6, 2024
bd97de8
Revert "common/common.c: only close_sdbus_once() if we are the same P…
jimklimov Dec 6, 2024
a14a55f
tests/NIT/nit.sh: generatecfg_upsmon_trivial() allow to toggle NOTIFY…
jimklimov Dec 6, 2024
ef3c86c
tests/NIT/nit.sh: refer to scripts/valgrind for debugging in a sandbox
jimklimov Dec 6, 2024
9046e23
clients/upsmon.c: ups_free(): release ups->status_tokens if needed [#…
jimklimov Dec 6, 2024
245e18e
clients/upsmon.c: upsmon_cleanup(): free(configfile) in the end
jimklimov Dec 6, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 15 additions & 1 deletion NEWS.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,12 @@ https://github.com/networkupstools/nut/milestone/11
models with serial port, made by NHS Sistemas Eletronicos LTDA and popular
in Brazil. Currently this driver only builds on Linux. [#2692]

- `usbhid-ups` and `netxml-ups` updated to handle "No battery installed!"
alarm also to set the `RB` (Replace Battery) value in `ups.status`.
This may cause dual triggering of notifications (as an `ALARM` generally
and as an important `REPLBATT` status in particular) in `upsmon`, but
better safe than sorry. [#415]

- usbhid-ups updates:
* Support of the `onlinedischarge_log_throttle_hovercharge` in the NUT
v2.8.2 release was found to be incomplete. [#2423, follow-up to #2215]
Expand Down Expand Up @@ -246,7 +252,7 @@ https://github.com/networkupstools/nut/milestone/11
that there is no common standard for what constitutes an alarm and such
alarm states were also previously observed for less severe reasons. This
depends on the manufacturer/device-specific implementation in the driver.
[issue #2657, PR #2658]
[issues #415, #2657, PR #2658]
* Updated documentation, end-user clients (CGI, NUT-Monitor UI);
* Updated `upsmon` client with ability to report entering and exiting
the ALARM status if reported by the driver;
Expand All @@ -261,6 +267,14 @@ https://github.com/networkupstools/nut/milestone/11
from templates). [issue #321, PR #2383]
* added an `OBLBDURATION` (seconds) setting to optionally delay raising
the alarm for immediate shutdown in critical situation. [#321]
* optimized `parse_status()` by not checking further strings if we had
a match; report unexpected tokens in debug log. [#415]
* revised internal `do_notify()` method to support formatting strings
with two `%s` placeholders, to use if certain use-cases pass any extra
information (e.g. not just "we have alarms" but their values too). [#415]
* introduced handling for "unknown" `ups.status` tokens, reporting them
as "OTHER" notification type (whenever the set of such tokens appears
or changes) or "NOTOTHER" when they disappear. [#415]

- More systemd integration:
* Introduced a `nut-sleep.service` unit which stops `nut.target` when a
Expand Down
8 changes: 7 additions & 1 deletion UPGRADING.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,13 @@ Changes from 2.8.2 to 2.8.3
some alarms can contribute to unwanted/early shutdowns. For this reason
a `0|1` setting `ALARMCRITICAL` was introduced into `upsmon.conf` (default
is `1`), for such users to be able to prevent their `upsmon` from treating
the `ALARM` status as overly severe when it is not in fact. [#2658]
the `ALARM` status as overly severe when it is not in fact. [#2658, #415]

- `usbhid-ups` and `netxml-ups` updated to handle "No battery installed!"
alarm also to set the `RB` (Replace Battery) value in `ups.status`.
This may cause dual triggering of notifications (as an `ALARM` generally
and as an important `REPLBATT` status in particular) in `upsmon`, but
better safe than sorry. [#415]

- `usbhid-ups` subdriver `PowerCOM HID` subdriver sent UPS `shutdown` and
`stayoff` commands in wrong byte order, at least for devices currently
Expand Down
Loading
Loading