[Nut-upsuser] Email Alerts for Multiple UPSs with upssched

Garrett Michael Hayes Garrett at VerbalImaging.com
Tue Oct 31 15:09:46 UTC 2017

Greetings Gentlebeings,

I have started deploying a number of NUT instances on Raspberry Pi machines (Raspbian Jessie) across my network.  The purpose of these "nutcases" as we refer to them is to monitor the status of the UPSs supporting our network switching infrastructure and notify us of power and battery events via email.  No shutdown or other actions are required.

Everything is going spiffy as all get-out so far.  But now I'm running up against a configuration issue I don't quite know how to address.

Thus far each "nutcase" has been configured to monitor a single UPS.  Now I want to deploy one to monitor three UPSs in a larger switch closet.  Adding the additional UPSs to ups.conf and upsmon.conf is fairly straightforward.  But I'm darned if I can figure out how to configure the email alerts to let me know WHICH UPS is the source of an event.

I'm using upssched as my NOTIFYCMD, and it in turn is calling a little shell script that reads the flag that's passed and sends an email.  What I can't figure out is how (if there is a way) to determine the originating UPS.  It seems that only the status flag makes it across to the shell script.  Or at least if it's passing more than that, I don't know how to retrieve it.

I'm sure I must be missing something simple.  Any thoughts/pointers would be appreciated!

Garrett Michael Hayes

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.alioth.debian.org/pipermail/nut-upsuser/attachments/20171031/7134c5d9/attachment.html>

More information about the Nut-upsuser mailing list