Bonjour, je vous fais profiter de mon expérience, faites-moi part de vos améliorations :
1 nas UPS master + 1 nas salve et 1 Mac slave aussi !
Voilà la solution retenue (et qui fonctionne) :
2 serveurs FreeBSD (avec Nas4free, aujourd'hui Xigmanas) pour lesquels seul le clikodrome suffit à la configuration et le mac os X (voir ci-dessous) :
Si l'Asi n'est pas connecté, le démon ioups n'est pas lancé sur le Mac,
pour ce qui est de Nut, seul ipscom est nécessaire.
1. brew install nut
2. Configuration de upscom :
# cd /usr/local/Cellar/nut/2.7.4/etc
# cat upsmon.conf
MONITOR upsmon@192.168.0.9 1 upsmon blablabla slave
SHUTDOWNCMD "/usr/libexec/upsshutdown WaitForUPS"
NOTIFYCMD "/usr/local/sbin/upssched"
NOTIFYFLAG COMMBAD SYSLOG+EXEC
NOTIFYFLAG COMMOK SYSLOG+EXEC
NOTIFYFLAG FSD SYSLOG+EXEC
NOTIFYFLAG NOCOMM SYSLOG+EXEC
NOTIFYFLAG ONBATT SYSLOG+EXEC
NOTIFYFLAG REPLBATT SYSLOG+EXEC
NOTIFYFLAG SHUTDOWN SYSLOG+EXEC
NOTIFYMSG LOWBATT "%s has a low battery!"
NOTIFYMSG ONLINE "%s is back online"
FINALDELAY 5
HOSTSYNC 15
MINSUPPLIES 1
NOCOMMWARNTIME 300
# Interrogation normale
POLLFREQ 5
# Interrogation en situation critique
POLLFREQALERT 5
# POLLFREQ * POLLFREQALERT
DEADTIME 25
POWERDOWNFLAG /etc/killpower
RBWARNTIME 43200
# cat upssched.conf
CMDSCRIPT /usr/local/Cellar/nut/2.7.4/bin/upssched-cmd
LOCKFN /var/state/ups/upssched/upssched.lock
PIPEFN /var/state/ups/upssched/upssched.pipe
AT ONBATT * EXECUTE ONBATT
AT ONBATT * START-TIMER SHUTDOWN 5
AT FSD * EXECUTE forced-shutdown
AT LOWBATT * EXECUTE shutdown-warning
AT LOWBATT * START-TIMER shutdown
AT ONLINE * CANCEL-TIMER shutdown
AT ONLINE * EXECUTE resume
AT COMMBAD * EXECUTE notify
AT COMMOK * EXECUTE notify
AT NOCOMM * EXECUTE notify
AT NOPARENT * EXECUTE notify
AT REPLBATT * EXECUTE notify
AT SHUTDOWN * EXECUTE notify
Hyperion etc # cat /Library/LaunchDaemons/org.networkupstools.upsmon.plist
<?xml version="1.0" encoding="UTF-8"?>
<plist version="1.0">
<dict>
<key>KeepAlive</key>
<true/>
<key>Label</key>
<string>org.networkupstools.upsmon</string>
<key>ProgramArguments</key>
<array>
<string>/usr/local/sbin/upsmon</string>
<string>-D</string>
</array>
<key>RunAtLoad</key>
<true/>
<key>StandardOutPath</key>
<string>/Library/Logs/upsmon.log</string>
<key>StandardErrorPath</key>
<string>/Library/Logs/upsmon.log</string>
</dict>
</plist>
3. le lancement s'effectue ainsi :
# launchctl load -w /Library/LaunchDaemons/org.networkupstools.upsmon.plist
On peu surveiller ici :
Hyperion etc # tail -f /Library/Logs/upsmon.log
[…]
Network UPS Tools upsmon 2.7.4
55.484698 Trying to connect to UPS [upsmon@192.168.0.9]
60.484426 Communications with UPS upsmon@192.168.0.9 established
N'hésitez pas à me poser des questions restées dans l'ombre (quoi qu'à cette période !)
Cordialement et bonne journée
This is the old XigmaNAS forum in read only mode,
it will taken offline by the end of march 2021!
I like to aks Users and Admins to rewrite/take over important post from here into the new fresh main forum!
Its not possible for us to export from here and import it to the main forum!
it will taken offline by the end of march 2021!
I like to aks Users and Admins to rewrite/take over important post from here into the new fresh main forum!
Its not possible for us to export from here and import it to the main forum!
1 nas UPS master + 1 nas salve et 1 Mac slave aussi !
Moderators: velivole18, ernie, mtiburs
-
dhenin
- Starter

- Posts: 63
- Joined: 12 Apr 2013 08:47
- Location: Poissy (France)
- Status: Offline
1 nas UPS master + 1 nas salve et 1 Mac slave aussi !
---------------------------------------------------------
(V) Dhénin Jean-Jacques
( ..) 78300 Poissy
c(')(') dhenin@gmail.com
---------------------------------------------------------
(V) Dhénin Jean-Jacques
( ..) 78300 Poissy
c(')(') dhenin@gmail.com
---------------------------------------------------------