software:nut:multisystems
Differences
This shows you the differences between two versions of the page.
software:nut:multisystems [2025/04/14 17:51] – created rodolico | software:nut:multisystems [2025/04/14 18:01] (current) – removed rodolico | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== nut server providing data on multiple systems ====== | ||
- | This documents how to set up a specific //nut// installation. The requirements are: | ||
- | |||
- | * Using a Cyberpower 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 opnSense firewall/ | ||
- | * One FreeBSD NAS | ||
- | |||
- | ===== Set up UPS ===== | ||
- | 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) | ||
- | * If using v2, get username and password | ||
- | * record the IP address/DNS Name | ||
- | * choose the name you want to give to this UPS | ||
- | |||
- | ===== 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 | ||
- | |||
- | <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 | ||
- | |||
- | <file autoconf nut.conf> | ||
- | MODE=netserver | ||
- | </ | ||
- | |||
- | This is the nasty part. We need to have ups.conf set up with the correct stanza to read the snmp UPS. Normally we would just point nut-scanner at it, but nut-scanner has some issues, at least on 2.7.4, under Debian where it can not find the snmp libraries. So, autodetect does not work. | ||
- | nut-scanner --snmp_scan --mask_cidr 192.168.100.0/ | ||
- | returns "SNMP library not found. SNMP search disabled." | ||
- | |||
- | So, we'll do it the way that is more susceptible to error. Modify the following to match your setup, then put it in ups.conf | ||
- | |||
- | <file autoconf ups.conf> | ||
- | maxretry = 3 | ||
- | # the part in the [] ([ups1]) is the name of the UPS, which you will use several places later | ||
- | [ups1] | ||
- | | ||
- | # the IP and port of the snmp enabled UPS | ||
- | port = 192.168.1.17: | ||
- | # the community name it will respond to, preferably read/only access | ||
- | | ||
- | # the version of snmp on the UPS | ||
- | | ||
- | # an arbitray description, | ||
- | desc = " | ||
- | </ | ||
- | |||
- | Now, set up where the server (the NUT server on your master) will listen for other machines to make the connection. 0.0.0.0 means " | ||
- | <file autoconf upsd.conf> | ||
- | LISTEN 0.0.0.0 3493 | ||
- | </ | ||
- | |||
- | Set up a user. Here, we're setting up a user names upsmon, with the password ' | ||
- | <file autoconf upsd.users> | ||
- | [upsmon] | ||
- | | ||
- | | ||
- | </ | ||
- | |||
- | Finally, set up the monitoring itself with upsmon.conf The first few lines are some defaults with the standard nut install; the main thing we are chaning is the final line. | ||
- | |||
- | The final line says | ||
- | Monitor the system (UPS) named ups1 on the local machine (ups1@localhost), | ||
- | |||
- | upsmon is the username to connect to that server (ups1@localhost), | ||
- | |||
- | ' | ||
- | |||
- | <file autoconf upsmon.conf> | ||
- | MINSUPPLIES 1 | ||
- | SHUTDOWNCMD "/ | ||
- | POLLFREQ 5 | ||
- | POLLFREQALERT 5 | ||
- | HOSTSYNC 15 | ||
- | DEADTIME 15 | ||
- | POWERDOWNFLAG / | ||
- | RBWARNTIME 43200 | ||
- | NOCOMMWARNTIME 300 | ||
- | FINALDELAY 5 | ||
- | monitor ups1@localhost 1 upsmon mypassword master | ||
- | </ | ||
- | |||
- | I don't really understand upssched.conf yet, but it is one of the powerhouses of nut. Working on it. | ||
- | |||
- | <file autoconf upssched.conf> | ||
- | CMDSCRIPT / | ||
- | </ |
software/nut/multisystems.1744671089.txt.gz · Last modified: 2025/04/14 17:51 by rodolico