Difference between revisions of "Uninterruptable Power Supply/fr"
Line 84: | Line 84: | ||
Whenever a UPS event occurs Emails are sent to the admin account. | Whenever a UPS event occurs Emails are sent to the admin account. | ||
</li></ol> | </li></ol> | ||
+ | |||
+ | ====Configuring as a master==== | ||
+ | edit the file /etc/ups/nut.conf, and modify the line | ||
+ | MODE=netserver | ||
+ | |||
+ | Set configuration values: | ||
+ | config setprop nut access private TCPPort 3493 | ||
+ | expand-template /etc/ups/upsd.conf | ||
+ | expand-template /etc/rc.d/init.d/masq | ||
+ | systemctl restart masq | ||
+ | systemctl restart nut-server | ||
+ | |||
+ | ====Configuring as a slave==== | ||
+ | Set configuration values: | ||
+ | config setprop nut SlaveUPS UPS@192.168.33.11 | ||
+ | config setprop nut Master no | ||
+ | |||
+ | Where 192.168.33.11 is your UPS master, that is the computer that is in direct communication with the UPS. The hostname of that computer may also work. | ||
+ | |||
+ | Apply changes and restart server: | ||
+ | signal-event post-upgrade | ||
+ | signal-event reboot | ||
+ | |||
+ | or (for SME10): | ||
+ | signal-event e-smith-nutUPS-update | ||
+ | |||
+ | Confirm server is communicating with master: | ||
+ | upsc UPS@192.168.33.11 | ||
+ | |||
+ | ====Connecting multiple UPS's==== | ||
+ | To be added http://bugs.contribs.org/show_bug.cgi?id=629 | ||
+ | |||
+ | <tabs container> | ||
+ | <tab name="SME 9"> | ||
+ | |||
+ | {{Warning box|Be sure to have e-smith-nutUPS-2.4.0-9.el6.sme.noarch or higher to carry on with these instructions. If you get a lower version, just follow SME8 instruction.}} | ||
+ | |||
+ | rpm -qa e-smith-nutUPS | ||
+ | |||
+ | If you get NUT running with administrative privileges modification from sme8 instruction, you need to remove the custom template created for this. These variables are taken in charge by the new package. | ||
+ | |||
+ | First you need to delete the custom template file.( This command delete the directory, be sure you don't have personal file present. If the case, delete manualy the file created for administrative privileges ) | ||
+ | |||
+ | rm -rf /etc/e-smith/templates-custom/etc/ups/upsd.users | ||
+ | |||
+ | Now, to get '''upsd''' to recognise the modification of user, we need to expand the template and reload the '''upsd''' configuration | ||
+ | |||
+ | /sbin/e-smith/expand-template /etc/ups/upsd.users | ||
+ | /usr/sbin/upsd -c reload | ||
+ | |||
+ | ===Variables et commandes ASI=== | ||
+ | Dans certains cas, vous souhaiterez peut-être modifier les variables de l'onduleur lui-même, telles que le paramètre Low Charge/LOWBATTERY. Cela nécessite l'utilisation de la commande '''upsrw''' et les privilèges d'administrateur ASI. | ||
+ | |||
+ | Vous souhaiterez peut-être également contrôler l'onduleur directement à partir de la ligne de commande en émettant des commandes ASI. Cela nécessite l'utilisation de la commande '''upscmd''' et les privilèges d'administrateur ASI. | ||
+ | {{Warning box|type=Attention : |en général, les données de l'onduleur doivent rester protégées et les modifications ou l'émission de commandes doivent être effectuées avec attention. Si vous souhaitez apporter des modifications aux données ou émettre des commandes, les privilèges d'administrateur peuvent être activés comme ci-dessous et doivent ensuite être désactivés.}} | ||
+ | | ||
+ | |||
+ | |||
+ | ====UPS Administrative Privileges==== | ||
+ | |||
+ | You should check your new password ( AdminPass ) to run '''upserw''' & '''upscmd'''. Of course, you could change your password for a easier one to use. | ||
+ | |||
+ | config show nut | ||
+ | |||
+ | To set new admin password in database. The new password would be admin ( change it to suit your need ) | ||
+ | |||
+ | config setprop nut AdminPass admin | ||
+ | |||
+ | To enabled administrative privileges and run command to ups. | ||
+ | |||
+ | config setprop nut AdminUser enabled | ||
+ | |||
+ | Now, to get '''upsd''' to recognise admin modification for administrative privileges we expand the template and reload the '''upsd''' configuration | ||
+ | |||
+ | /sbin/e-smith/expand-template /etc/ups/upsd.users | ||
+ | /usr/sbin/upsd -c reload | ||
+ | |||
+ | {{Note box|To disabled the administrative privileges once you have changed the UPS parameters or issued commands as required, issue the commands | ||
+ | config setprop nut AdminUser disabled | ||
+ | /sbin/e-smith/expand-template /etc/ups/upsd.users | ||
+ | /usr/sbin/upsd -c reload | ||
+ | }} |
Revision as of 08:43, 17 January 2024
Is this article helpful to you?
Please consider donating or volunteering
Thank you!
Alimentation sans interruption - ASI
Introduction
L'objectif principal du projet Network UPS Tools (NUT) est de fournir une surveillance fiable du matériel d'ASI et d'assurer des arrêts sûrs des systèmes connectés.
La configuration par défaut de NUT maintiendra vos systèmes connectés opérationnels jusqu'à ce qu'un état critique de la batterie soit atteint (c'est-à-dire que la batterie soit presque vide), puis mettra hors tension votre serveur/équipement de manière contrôlée. Voir http://www.networkupstools.org/ (en anglais).
Si vous disposez d'un onduleur de marque APC, consultez également Uninterruptable_Power_Supply:APC (en anglais) pour une alternative à l'implémentation ordinaire Koozali SME « Nut ».
Si vous disposez d'une ASI Dell, cela pourrait vous aider Uninterruptable_Power_Supply:LatestGeekery (en anglais).
Configuration par défaut (USB)
La configuration par défaut pour 'NUT' dans le serveur Koozali SME est assurée par les propriétés de la base de données de configuration :
Model = usbhid-ups status = disabled type = service
La plupart des ASI connectées en USB fonctionneront avec ces paramètres par défaut. Si vous utilisez une connexion USB, activez seulement NUT comme suit :
Pour Koozali SME 10, systemd est maintenant en service. Nous avons créé un service générique pour votre commodité :
config setprop nut status enabled signal-event e-smith-nutUPS-update systemctl restart nut-server.service systemctl restart nut-monitor.service systemctl restart nut.service
config setprop nut status enabled signal-event post-upgrade signal-event reboot
Si votre ASI USB ne fonctionne pas correctement OU si vous avez un appareil série, alors suivez les « Options de configuration » ci-après comme requises.
Configuration Options
Not all UPS's are supported by USB or the usbhid-ups driver. However NUT supports many UPS's and can be configured under SME Server easily.
Serial Connection
- Find the configuration details for your model of UPS. Refer to: http://www.networkupstools.org/stable-hcl.html and make note of the driver name and upstype number (if any) in the third column.
- From the console issue the following commands:
config setprop nut Model <model>
config setprop nut Device <device>
config setprop nut Type <type>
config setprop nut status enabled
Where:
<model> and <type> are the driver name and type number found above.
<device> is the serial port that the UPS is connected to eg. /dev/ttyS0. It also possible to use a more readable symlink. See HowTo on udev - symlinks for details. Note: The case of Model, Device and Type. - Check: config show nut
- Apply changes and restart server: signal-event post-upgrade signal-event reboot Alternatively, without NUT running or requiring a server reboot: signal-event console-save service nut start
- Confirm server is communicating with UPS: upsc UPS@localhost Whenever a UPS event occurs Emails are sent to the admin account.
Configuring as a master
edit the file /etc/ups/nut.conf, and modify the line
MODE=netserver
Set configuration values:
config setprop nut access private TCPPort 3493 expand-template /etc/ups/upsd.conf expand-template /etc/rc.d/init.d/masq systemctl restart masq systemctl restart nut-server
Configuring as a slave
Set configuration values:
config setprop nut SlaveUPS UPS@192.168.33.11 config setprop nut Master no
Where 192.168.33.11 is your UPS master, that is the computer that is in direct communication with the UPS. The hostname of that computer may also work.
Apply changes and restart server:
signal-event post-upgrade signal-event reboot
or (for SME10):
signal-event e-smith-nutUPS-update
Confirm server is communicating with master:
upsc UPS@192.168.33.11
Connecting multiple UPS's
To be added http://bugs.contribs.org/show_bug.cgi?id=629
<tabs container> <tab name="SME 9">
rpm -qa e-smith-nutUPS
If you get NUT running with administrative privileges modification from sme8 instruction, you need to remove the custom template created for this. These variables are taken in charge by the new package.
First you need to delete the custom template file.( This command delete the directory, be sure you don't have personal file present. If the case, delete manualy the file created for administrative privileges )
rm -rf /etc/e-smith/templates-custom/etc/ups/upsd.users
Now, to get upsd to recognise the modification of user, we need to expand the template and reload the upsd configuration
/sbin/e-smith/expand-template /etc/ups/upsd.users /usr/sbin/upsd -c reload
Variables et commandes ASI
Dans certains cas, vous souhaiterez peut-être modifier les variables de l'onduleur lui-même, telles que le paramètre Low Charge/LOWBATTERY. Cela nécessite l'utilisation de la commande upsrw et les privilèges d'administrateur ASI.
Vous souhaiterez peut-être également contrôler l'onduleur directement à partir de la ligne de commande en émettant des commandes ASI. Cela nécessite l'utilisation de la commande upscmd et les privilèges d'administrateur ASI.
UPS Administrative Privileges
You should check your new password ( AdminPass ) to run upserw & upscmd. Of course, you could change your password for a easier one to use.
config show nut
To set new admin password in database. The new password would be admin ( change it to suit your need )
config setprop nut AdminPass admin
To enabled administrative privileges and run command to ups.
config setprop nut AdminUser enabled
Now, to get upsd to recognise admin modification for administrative privileges we expand the template and reload the upsd configuration
/sbin/e-smith/expand-template /etc/ups/upsd.users /usr/sbin/upsd -c reload