Skip to content

upssched: Introduce passing of NOTIFYMSG to a CMDSCRIPT#3110

Merged
jimklimov merged 16 commits intonetworkupstools:masterfrom
jimklimov:issue-3105
Oct 8, 2025
Merged

upssched: Introduce passing of NOTIFYMSG to a CMDSCRIPT#3110
jimklimov merged 16 commits intonetworkupstools:masterfrom
jimklimov:issue-3105

Conversation

@jimklimov
Copy link
Copy Markdown
Member

@jimklimov jimklimov commented Oct 2, 2025

Closes: #3105
Follows up from: #3097

Allow the ultimately executed command scripts to see the layman-text message and perhaps forward it to mail/SMS/etc.

For conformity with UPSNAME and NOTIFYTYPE, this is also passed via envvars (but is optional).

In make check-NIT-sandbox-devel the test loop now reports e.g.:

Thu Oct  2 16:10:26 UTC 2025: /home/jim/nut/clients/upssched-cmd: THIS IS A SAMPLE SCRIPT, PLEASE TAILOR IT FOR YOUR DEPLOYMENT OF NUT!
Thu Oct  2 16:10:26 UTC 2025: UPSNAME='dummy@localhost:12345'   NOTIFYTYPE='ONBATT'     NOTIFYMSG='UPS dummy@localhost:12345 on battery'        args=BATT-STATUS-1s

Also follows up with earlier changes to upssched/upsmon interaction - some fixes, many docs.

…s#3105]

Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
…hods, for less confusing dev-testing logs [networkupstools#3105]

Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
@jimklimov jimklimov added this to the 2.8.5 milestone Oct 2, 2025
@jimklimov jimklimov added enhancement upsmon upssched Questions and issues about upssched (timer helper for upsmon) labels Oct 2, 2025
@jimklimov
Copy link
Copy Markdown
Member Author

@markuswells : you are welcome to test this PR branch, see https://github.com/networkupstools/nut/wiki/Building-NUT-for-in%E2%80%90place-upgrades-or-non%E2%80%90disruptive-tests about custom-building NUT for this.

@AppVeyorBot
Copy link
Copy Markdown

Comment thread clients/upssched.c Fixed
Comment thread clients/upssched.c Dismissed
…ways issued at latest when shutdown handling just starts (or earlier) [networkupstools#3003, networkupstools#3110]

Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
…execution is not async in upssched

Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
…own activity on the upsmon primary system [networkupstools#3003]

Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
@AppVeyorBot
Copy link
Copy Markdown

@AppVeyorBot
Copy link
Copy Markdown

…AND UPSMON ROLES section

Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
…on, refer to TIMED SHUTDOWNS section

Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
…IT scripts as a source of inspiration

Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
…efinitions [networkupstools#3084]

Also helps NIT generate an upsmon.conf to report those events in tests.

Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
@jimklimov jimklimov merged commit 70dae7b into networkupstools:master Oct 8, 2025
30 checks passed
@jimklimov jimklimov deleted the issue-3105 branch October 8, 2025 08:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation enhancement upsmon upssched Questions and issues about upssched (timer helper for upsmon)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

How do I get the NOTIFYMSG into the upssched-cmd script from the upsmon.conf

3 participants