software:nut:master
Differences
This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
software:nut:master [2025/04/14 18:05] – created rodolico | software:nut:master [2025/04/14 22:32] (current) – rodolico | ||
---|---|---|---|
Line 5: | Line 5: | ||
This document was written using the following configuration. | This document was written using the following configuration. | ||
- | * Cyberpower PR1000LCDRT2U UPS with an RMCARD205 installed, giving LAN access to the UPS control, snmp monitoring and other things | + | |
- | * One Devuan (Debian) workstation will be set up as the master. It will communicate with the UPS, then other machines will communicate with it | + | * One Devuan (Debian) workstation will be set up as the master. It will communicate with the UPS, then other machines will communicate with it |
- | * One opnSense firewall/ | + | * One opnSense firewall/ |
- | * One FreeBSD NAS | + | * One FreeBSD NAS |
+ | |||
+ | **Note:** a Raspberry Pi works very well as a stand alone NUT server. See https:// | ||
===== Set up UPS ===== | ===== Set up UPS ===== | ||
Log into the UPS via web browser, ssh or telnet and get/set the following: | Log into the UPS via web browser, ssh or telnet and get/set the following: | ||
- | * snmp community name | + | |
- | * snmp version (I'm using v1 in a secured environment) | + | * snmp version (I'm using v1 in a secured environment) |
- | * If using v2, get username and password | + | * If using v2, get username and password |
- | * record the IP address/DNS Name | + | * record the IP address/DNS Name |
- | * choose the name you want to give to this UPS | + | * choose the name you want to give to this UPS |
===== Set up master ===== | ===== Set up master ===== | ||
- | first, install the necessary packages. I'm not sure if all of these are needed, but I think they are I chose not to install the webui | + | ==== Installation ==== |
+ | |||
+ | first, install the necessary packages. I'm not sure if all of these are needed, but I think they are I chose not to install the webui as I monitor the UPS with Zabbix, and manage through the RMCARD | ||
<code bash>apt -y install snmp snmp-mibs-downloader nut nut-client nut-server nut-snmp</ | <code bash>apt -y install snmp snmp-mibs-downloader nut nut-client nut-server nut-snmp</ | ||
- | Now, set up the master to be a network server | + | ==== Configure ==== |
+ | |||
+ | On Devuan/ | ||
+ | |||
+ | Set up the master to be a network server | ||
<file autoconf nut.conf> | <file autoconf nut.conf> | ||
Line 91: | Line 99: | ||
CMDSCRIPT / | CMDSCRIPT / | ||
</ | </ | ||
+ | |||
+ | ==== Test ==== | ||
+ | |||
+ | First, restart the service. On Devuan, it is called nut-server | ||
+ | |||
+ | <code bash> | ||
+ | service nut-server restart | ||
+ | </ | ||
+ | |||
+ | Test to make sure you have a connection and the server is correctly reading the UPS. You do not have to put in the @localhost; that is the default. | ||
+ | |||
+ | <code bash> | ||
+ | # get list of all UPS' defined on localhost | ||
+ | upsc -L localhost | ||
+ | # get list of all values on one particular UPS (ups1) | ||
+ | upsc ups1@localhost | ||
+ | </ | ||
+ | |||
+ | ==== NUT ups commands ==== | ||
+ | * upsc - lightweight UPS client. Really, set up to be an example of what you can create, but very useful. <code bash> | ||
+ | * upscmd - send commands to UPS if it will accept. Try <code bash> | ||
+ | * upsd - This is the primary daemon that should always run to provide information about one or more UPS'. Generally auto started by the init system | ||
+ | * upsdrvctl - standard interface to the UPS drivers. Not generally needed unless you are writing/ | ||
+ | * upslog - A tool designed to read one or more UPS' and log the readings. Very useful for upssched if you want a nice log of how your UPS is working. | ||
+ | * upsmon - A daemon which monitors all UPS' defined in upsmon.conf | ||
+ | * upsrw - allows you to change some variables //on the ups itself// if the ups allows it. | ||
+ | * upssched - scheduler to run commands listed in upssched.conf. This is called by upsmon and should not be used directly. | ||
+ | * upssched-cmd - A sample upssched file. A simple shell script that performs commands in response to upssched. | ||
+ | |||
+ | ===== Links ===== | ||
+ | * https:// | ||
+ | * https:// | ||
+ | * https:// | ||
+ | * |
software/nut/master.1744671921.txt.gz · Last modified: 2025/04/14 18:05 by rodolico