Stilez Stilezy
2018-Mar-30 06:46 UTC
[Nut-upsuser] Trying to update the official docs for nut on FreeNAS - help needed to ensure it's written correctly
This is slightly off-topic, I guess, but I'm not sure who better to ask for help. I'm active within the FreeNAS community and involved in their (FreeBSD based) documentation work. There is a long standing bug ticket - years old now - to update their "network ups tools" docs page, to cover Ethernet attached UPS that use nut for the link. Currently the docs mainly describes configuring USB connected power, not Ethernet connected power. The docs team have pretty much indicated they don't have the resources available to do this, and asked if I can work it out and propose any necessary docs changes to cover nut over Ethernet. I'm a complete newcomer to nut, so I don't know that much about its config files, but I probably wouldn't need to know much to improve the issues in their docs so I'd like to have a go. I'm sure most of this is in nut docs, but I'm fitting this in between jobs and help would be appreciated so I can help quickly and with more certainty. My own UPS setup is an APC SUA 1500i + AP9630 card, and the default user on the UPS has been changed, so that's what I'll test anything with, to check my understanding and appropriate inputs. My questions are mainly about the config required to correctly link to an ethernet UPS using nut (connection/users/pw config), not so much about advanced config or management of a UPS once connected (master/slave/status info/control): GENERAL NUT + ETHERNET CONNECTIONS: 1. Is "ethernet" likely to be synonymous with "snmp" for UPS network cards? Is information update based entirely on the daemon periodically polling, or does the UPS independently broadcast across the network upon a status issue, for any device to receive? If the UPS can both broadcast and be polled, does nut use both capabilities? 2. What users/passwords provided/created/usual in nut -> Ethernet UPS? For example, does 3rd party software need a user/pw for a nut client to communicate with the daemon, and *also* the daemon need a separate user/pw to login and get status info from the UPS? Is a user/pw combination needed just to get status info from the UPS, such as if power is OK, or to be alerted if there is a power issue? (I'd expect so, but worth checking explicitly) 3. What would be the basic config params needed to establish a data link to an ethernet-connected UPS (other than user/pw) when using nut in a simple way to communicate with the UPS? FREENAS/FREEBSD SPECIFIC: 4. Does anyone already use FreeNAS/FreeBSD with an APC UPS+AP963x network card? If so, what nut config do you use - either FreeNAS GUI fields or nut main config file entries that are important, would help. Are there any crucial setup points you find important/necessary to get it working well, or other comments on your config? 5. The FreeNAS UPS service GUI has fields marked "monitor user+pw". Some web references seem to suggest they contain the users defined externally in the UPS through Powerchute/WebUI, other sources suggest they are used internally by the nut client to communicate with a nut daemon. Nobody (including the team itself) actually seems to be very sure which is somewhat intriguing! To save dabbling in the codebase, does anyone happen to know for sure what the data in these fields is used for, off the top of their head? Thanks for any help you can give. Any assistance appreciated! Stilez -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.alioth.debian.org/pipermail/nut-upsuser/attachments/20180330/33421bf5/attachment.html>
Charles Lepple
2018-Mar-31 15:44 UTC
[Nut-upsuser] Trying to update the official docs for nut on FreeNAS - help needed to ensure it's written correctly
On Mar 30, 2018, at 2:46 AM, Stilez Stilezy <stilezy at gmail.com> wrote:> GENERAL NUT + ETHERNET CONNECTIONS: > > 1. Is "ethernet" likely to be synonymous with "snmp" for UPS network cards?It is the most likely, but there are definitely Ethernet network cards for MGE models that support SNMP as well as an XML-based protocol over HTTP. We have a similar situation with the USB-connected UPSes. The physical connector says nothing about the protocol (HID PDC, serial-over-USB, or other vendor proprietary).> Is information update based entirely on the daemon periodically polling, or does the UPS independently broadcast across the network upon a status issue, for any device to receive? If the UPS can both broadcast and be polled, does nut use both capabilities?I don't see any mention of traps in the NUT documentation, so I think NUT is only polling the network card via SNMP. Reference: http://networkupstools.org/docs/man/snmp-ups.html> 2. What users/passwords provided/created/usual in nut -> Ethernet UPS?I would phrase this a little differently to avoid confusion, in that NUT has the concept of users regardless of the connection to the UPS (USB, serial, network).> For example, does 3rd party software need a user/pw for a nut client to communicate with the daemon, and *also* the daemon need a separate user/pw to login and get status info from the UPS?Same thing here: NUT username/passwords are separate from the authentication used over SNMP. I would recommend using the specific SNMP terminology to avoid confusion. The different versions of SNMP use various names for the authentication parameters. SNMPv1 uses "community" names, sent in the clear, and the read-only default name is "public". To have NUT command the UPS to shut itself off after the servers are powered down, you need a RW community name (which is usually treated like a password, but is also sent in the clear with SNMPv1). SNMPv3 has authentication and privacy protocols, and the NUT configuration parameters (the ones that FreeNAS would need to write to ups.conf) are listed in the snmp-ups man page cited above.> Is a user/pw combination needed just to get status info from the UPS, such as if power is OK, or to be alerted if there is a power issue? (I'd expect so, but worth checking explicitly)No password needed to check NUT status (this is what happens when you run "upsc name-of-ups at name-of-server"), but a NUT username and password is needed to log in as a slave. Although a slave is just monitoring the master, the distinction is because the slaves are also capable of blocking the master shutdown sequence. More info on NUT username/passwords: http://networkupstools.org/docs/man/upsd.users.html> 3. What would be the basic config params needed to establish a data link to an ethernet-connected UPS (other than user/pw) when using nut in a simple way to communicate with the UPS?I think both cases (NUT and SNMP) are covered in the answers above, but feel free to ask for clarification.> FREENAS/FREEBSD SPECIFIC: > > 4. Does anyone already use FreeNAS/FreeBSD with an APC UPS+AP963x network card? If so, what nut config do you use - either FreeNAS GUI fields or nut main config file entries that are important, would help. Are there any crucial setup points you find important/necessary to get it working well, or other comments on your config?Might be worth checking the mailing list archives (search box is on http://networkupstools.org/support.html ) to see if anyone else has posted details.> 5. The FreeNAS UPS service GUI has fields marked "monitor user+pw". Some web references seem to suggest they contain the users defined externally in the UPS through Powerchute/WebUI, other sources suggest they are used internally by the nut client to communicate with a nut daemon. Nobody (including the team itself) actually seems to be very sure which is somewhat intriguing! To save dabbling in the codebase, does anyone happen to know for sure what the data in these fields is used for, off the top of their head?I suspect that if the fields do not go away if you choose a non-networked UPS, then it is referring to monitoring another NUT instance (you would also need the hostname of the NUT master system for that). You could also put in unique values for the user and password, and check which of the NUT configuration files they end up in. (When replying, be sure to use "Reply All" to include the mailing list. Thanks!)
Roger Price
2018-Mar-31 19:39 UTC
[Nut-upsuser] Trying to update the official docs for nut on FreeNAS - help needed to ensure it's written correctly
On Fri, 30 Mar 2018, Stilez Stilezy wrote:> My own UPS setup is an APC SUA 1500i + AP9630 card, and the default user on > the UPS has been changed, so that's what I'll test anything with, to check my > understanding and appropriate inputs.Perhaps this question is even more off-topic, but given that the APC SUA1500i already offers a USB interface and a serial interface, what does the AP9630 offer FreeNAS in addition, other than complexity and expense? Roger