[Nut-upsuser] Upssched not getting called from UPSMON

Ito-Cole, Kaeny (Student) Kaeny.Ito-Cole.stu at gtri.gatech.edu
Thu Sep 20 21:30:38 BST 2018


Hi, I cant seem to get my upssched to get called by upsmon. Upsmon -c fsd just shuts down without the message I set or the one in upssched-cmd

 

/etc/ups/upsmon.conf:

 

 MONITOR ups6 at localhost 1 <user> <pass> master

 MONITOR ups8 at localhost 1 <user> <pass> master

 

 SHUTDOWNCMD "/sbin/shutdown -h +0"

 

 NOTIFYCMD /usr/sbin/upssched

 

 NOTIFYMSG FSD         "UPS %s: forced shutdown in progress TEST"

 

 NOTIFYFLAG ONLINE     SYSLOG+EXEC

 NOTIFYFLAG ONBATT     SYSLOG+EXEC

 NOTIFYFLAG LOWBATT    SYSLOG+EXEC+WALL

 NOTIFYFLAG FSD SYSLOG+EXEC+WALL

 NOTIFYFLAG COMMOK     SYSLOG+EXEC+WALL

 NOTIFYFLAG COMMBAD    SYSLOG+EXEC+WALL

 NOTIFYFLAG SHUTDOWN   SYSLOG+EXEC+WALL

 NOTIFYFLAG REPLBATT   SYSLOG+EXEC+WALL

 NOTIFYFLAG NOCOMM     SYSLOG+EXEC+WALL

 NOTIFYFLAG NOPARENT   SYSLOG+EXEC+WALL

 

First question is: where is syslog located? I don’t see it in my /var/log folder. Even when I use WALL, I don’t get the message that I set for NOTIFYMSG FSG

 

/etc/ups/upssched.conf

 

CMDSCRIPT /etc/ups/scripts/upssched-cmd

 PIPEFN /etc/ups/upssched/upssched.pipe

 LOCKFN /etc/ups/upssched/upssched.lock

 

   AT ONLINE ups8 at localhost EXECUTE UPS8_ONLINE

   AT ONLINE ups6 at localhost EXECUTE UPS6_ONLINE

   AT ONBATT ups6 at localhost EXECUTE UPS6_ONBATT

   AT ONBATT ups8 at localhost EXECUTE UPS8_ONBATT

   AT FSD * EXECUTE shutdown_FSD

 

None of these get called when the events occur.

 

/etc/ups/scripts/upssched-cmd

 

WALL=wall

 

 

case $1 in

        upsgone)

                logger -t upssched-cmd "The UPS has been gone for awhile"

                ;;

        UPS6_ONLINE)

                logger -t upssched-cmd "UPS6 is online"

                echo "UPS6 is ONLINE" | ${WALL}

                ;;

        UPS8_ONLINE)

                logger -t upssched-cmd "UPS8 is online"

                echo "UPS8 is ONLINE" | ${WALL}

                ;;

        UPS6_ONBATT)

                logger -t upssched-cmd "UPS6 is running on battery. Shutting down attached devices."

                echo "UPS6 is running on battery!" | ${WALL}

                echo "No Servers attached to this UPS. No shutdown starting" | ${WALL}

                ;;

        UPS8_ONBATT)

                logger -t upssched-cmd "UPS8 is running on battery"

                echo "UPS8 is running on battery!" | ${WALL}

                echo "Shutting down VMs on ESXi 192.168.23.3 and 192.168.24.3" | ${WALL}

                ssh root at 192.168.23.3 "nohup /vmfs/volumes/datastore1/UPScontrol/shutdown_esxi.sh> /dev/null 2>&1 &"

                ssh root at 192.168.24.3 "nohup /vmfs/volumes/datastore1/UPScontrol/shutdown_esxi.sh> /dev/null 2>&1 &"

 

                echo "finished shutting ESXI down..." | ${WALL}

 

                exit 0

                ;;

        shutdown_FSD)

                logger -t upssched-cmd "FSD command"

                echo "Forced shutdown" | ${WALL}

                ;;

        *)

                logger -t upssched-cmd "Unrecognized command: $1"

                ;;

esac

 

 

None of this happens when the events occur. 

 

Can someone help me as to why this is?

 

 

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/nut-upsuser/attachments/20180920/670e73d6/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 3246 bytes
Desc: not available
URL: <http://alioth-lists.debian.net/pipermail/nut-upsuser/attachments/20180920/670e73d6/attachment.bin>


More information about the Nut-upsuser mailing list