Nethserver 7.9 and nut snmp-ups

Hello,

I have an APC SUA1500 with AP9617 Network Management Card. I haven’t an APC USB cable and server connect remotely to UPS. I use a power distribution for server and clients. I can only connect to control the UPS over LAN.

I found this howto [NS6.8] NUT and APC Network Management Card for use Network Management Card with nut. I found that need to install snmp-ups package.

My problem is I can’t found snmp-ups package for install and I can’t setup APC AP9617 card to control the server by UPS.

Can someone help me?

Thanks and Regards

Am I wrong…
https://networkupstools.org/stable-hcl.html
or AP9617 is not listed here?

networkupstools listed this: (various) SNMP monitoring card [snmp-ups]. I think it is mean it can use other APC UPS with other APC Network Management Card.

The problem is that I can’t found snmp-ups package for install and use nut snmp-ups. How can I install snmp-ups package on Nethserver 7.9?

Thanks

Correct. Select this model and set the IP address from the command line:

config setprop nut-server Device <ip_ups>
signal-event nethserver-nut-save

Thank you but this not works for me because snmp-ups package not installed…

I can’t guess why it’s not working, I have it running in production, so I’m sure it works.
You only need to install nut, as it contains /usr/sbin/snmp-ups.

That is not the reason it isn’t working. What exactly is it doing? What error are you seeing?

As stated by Filippo…

my TestServer with nethserver-nut installed…

# rpm -qa nethserver-nut
nethserver-nut-1.5.4-1.ns7.noarch
# ls /usr/sbin/snmp-ups
/usr/sbin/snmp-ups

@steve would you try to do the same? Maybe the package is not necessary, because the binary file is automatically installed :wink:

Also this manpage
snmp-ups(8) (networkupstools.org)
can help you to reach a ups.conf usable. Which needs to be integrated into template management…

1 Like

Thank you filippo I found the installed snmp-ups in /usr/sbin dir…

I ran recommend commands

config setprop nut-server Device 192.168.1.31
signal-event nethserver-nut-save

but I can’t configure it because the Nethserver 7.9 UPS setup screen is different from the referenced link.

How can I setup it?

Thanks

I attached screenshot…

From your screenshot, I think you didn’t configured your instance of NethServer to correctly use the correct driver.
The interface is a little bit different (my guide was for the old server-manager, yours is the Cockpit interface) but the options are still pretty legible and matching.
Follow my guide with the new interface and you should be able to get it to work (in particular, I see you inputed the wrong driver inside the screenshot you pasted here).

Cheers,

I am unable to configure the old server manager or Cockpit. The old server manager has changed there are not Mode and Master or Slave selection. There are only Local or Remote selection. If I set it according to your description it won’t work. The UPS status is not displayed and I get an error message.

Screenshot_20210202_125639

I tried to configure it manually as described by editing the config files and starting the nut-server and nut-monitor services manually. NUT configuration (understanding and replicating)

vi /etc/ups/nut.conf
MODE=netserver

vi /etc/ups/ups.conf
pollinterval = 10
[UPS]
driver = snmp-ups
port = 192.168.1.31

vi /etc/ups/upsd.conf
LISTEN 0.0.0.0

vi /etc/ups/upsd.users
[upsmon]
password = <password of “admin” user UPS>
upsmon master

vi/etc/ups/upsmon.conf
MONITOR UPS@192.168.1.31 1 upsmon admin master

This works and displays the status of the UPS.

My problem is that this is not a good solution because manual changes will be lost when these files are regenerated.

How can I resolve not to overwrite the manual setting?

Thanks

Hi syntaxerrormmm,

can you run two command and copy here the output? Please login root and run

db configuration show nut-server
db configuration show nut-monitor

then copy here output. It includes nut config and I’d like to see your setup… Please overwrite password and other private data but please sign if it include any value.

Thank you for your help.

I don’t have any NethServer anymore with UPS in production with a Network Card (now configuring NUT in ProxmoxVE, which is the hypervisor on the physical machines at the customers’).

This should be the needed parameters for a working instance of NUT on NethServer with a Network Card:

# db configuration show nut-server
nut-server=service
    Device=192.168.12.249
    Model=snmp-ups

nut-monitor configuration will be configured as soon as you complete the configuration on the server.

I really don’t see the difficulty to follow my guide, even with a (slightly changed) interface TBH.

You have to indicate as a driver snmp-ups, leave “USB (Auto)” as device. Once you click “save”, the interface will say that it had some issues (this is expected, because the “auto” device works only for some driver and for sure not for snmp-ups; plus, the possibility to override by hand the device inside Cockpit was not implemented), but nonetheless just run the commands that are in the guide and were indicated also by @filippo_carletti earlier in the thread. At the end of the process, the UPS with the network card will be correctly configured.

Thanks to everyone for their help. Unfortunately, there were several issues with the setup. But it was solved.

The problems were as follows:

  • old server management was not installed by default
    -the old server management has changed to include Local and Remote fields instead of Master and Slave
  • I tried to set up the UPS in the Cockpit but no one has done so yet
  • The Cockpit setting contains fields with different names and is not the same as the old server management
  • The description in the Developer Guide nethserver-nut only applies to the old server management and does not include the changes described above
  • after selection the Search driver for model field will be empty in the old interface, while in Cockpit after editing the Driver the modl field will also be empty
  • An APC AP9617 UPS Management card had to be connected over TCP, but the snmp-ups setting did not work
  • the recommended “config setprop nut-server Device IP-address” command was incorrect
  • and many more small bugs that didn’t help the solution …

Finally, I tried to configure the nut manually by editing the config files. Thus, it was possible to connect to the APC AP9617 management card and display the UPS status. This helped me find and understand the setup data under Settings.

Surprisingly, but the nut also finds the UPS with the USB (auto) setting, there is no need to set the UPS IP address separately. However, this may be necessary if there are multiple UPSs in the network. Then set the IP of the UPS that directly controls the server.

I will make a description for the setup soon and copy it here.

Thanks for all the help.

Ok, in the end it is not particularly complex, so if this worked for you, fine.

I am pretty skeptical about this. IIRC NUT doesn’t have any network scan mechanism, as such I would imply the settings used by NethServer to configure your UPS was inherited from a previous configuration which has the correct IP.

For all the other questions, well, maybe the documentation is not up to date. But I don’t expect this would take more than a day to setup a single UPS with NUT server with NethServer, honestly.

Indeed, I made a mistake. I forgot to delete the IP address from the upsmon.conf file when I made the settings again. It is absolutely necessary to set the IP address in the configuration database it prints an error.

It really was not a complicated task, although I could not continuously work on the problem. Once I found the nut config files approx. I set it to work manually in 10 minutes.

It took another 15 minutes for me to find out where the NethServer stores the nut config and enter it in the configuration database based on the manual settings to make it work.

After that, all I had to do was find what to write on the graphical interface to get the same setting in the configuration database.

The advantage of all this is that I can now manage the configuration databases and it took barely 1-2 hours. I think, that after this there is no need for the installation guide that I would have made …

Once again, I thank everyone for their help.
Greetings