Network UPS Connect (NOT HOST)

root@jayne:~# nut-scanner -S -s 192.168.1.40 -e 192.168.1.50
Scanning SNMP bus.
/etc/snmp/snmp.conf: line 13: Error: No handlers regestered for type smartups2200.
net-snmp: 1 error(s) in config file(s)
Created directory: /var/lib/snmp/cert_indexes
/etc/snmp/snmp.conf: line 13: Error: No handlers regestered for type smartups2200.
/etc/snmp/snmp.conf: line 14: Warning: Unknown token: driver.
/etc/snmp/snmp.conf: line 15: Warning: Unknown token: port.
/etc/snmp/snmp.conf: line 16: Warning: Unknown token: community.
/etc/snmp/snmp.conf: line 17: Warning: Unknown token: snmp_version.
/etc/snmp/snmp.conf: line 18: Warning: Unknown token: pollfreq.
net-snmp: 1 error(s) in config file(s)
[nutdev1]
driver = "snmp-ups"
port = "192.168.1.47"
desc = "Smart-UPS 2200"
mibs = "apcc"
community = "public"
[nutdev2]
driver = "snmp-ups"
port = "192.168.1.47"
desc = "APC"
mibs = "ietf"
community = "public"



" If your APC NW-attached UPS is found with the above (4.), you are good-to-go."
Not really - we're just getting started. This is where I'm hung up, the actual configuration.

This is what I have in /etc/nut/nut.conf

driver = snmp-ups
port = 192.168.1.47
community = public
snmp_version = v1
pollfreq = 15
desc = "smartups2200"

Beyond this, the link you provided is built around a USB connection, which again is where I'm stumbling because I don't have a usb connection. How can I test?
 
I have a Windows server that uses their network shutdown software. I have an esxi server that is using Vmware's VMA OVA Template

Their software - I gather you are on the powerchute UPS management setup? I won't be any help with the powerchute stuff, but there is an old thread of someone getting the proprietary apc platform to talk to an unraid server, might be of some help since it walks through much of the APC server settings for snmp.
https://forums.unraid.net/topic/57115-apc-ups-with-network-card-help-resolved/

Maybe you can glean how to setup the management server to at least send snmp traps to your pve nodes. Sorry it's been over a decade since I worked with any of the enterprise APC stuff, but I do remember powerchute being what managed all the UPS's, hoping you can find a solution with that. Best of luck.
 
I'd like to start off by saying - don't take out your frustration on users that are only spending their time trying to help you.

[nutdev1]
driver = "snmp-ups"
port = "192.168.1.47"
desc = "Smart-UPS 2200"
mibs = "apcc"
community = "public"
[nutdev2]
driver = "snmp-ups"
port = "192.168.1.47"
desc = "APC"
mibs = "ietf"
community = "public"
So your UPS is recognized on SNMP. You are showing 2 devices - I don't know why, but I guess that has todo with how your UPS NW card operates. I'd probably use the first one [nutdev1].

This is what I have in /etc/nut/nut.conf

driver = snmp-ups
port = 192.168.1.47
community = public
snmp_version = v1
pollfreq = 15
desc = "smartups2200"
That does not belong in nut.conf but in /etc/nut/ups.conf in the following format:
Code:
[smartups2200]  
    driver = snmp-ups
    mibs = apcc
    port = 192.168.1.47
    community = public
    snmp_version = v1
    pollfreq = 15
    desc = "Smart-UPS 2200"
paying attention to tabs & spacing, as both the tutorial & the docs I linked above suggest. You really need to pay attention.

If you follow all the commands you will probably get it working.
 
Last edited:
  • Like
Reactions: dj423 and waltar
"I'd like to start off by saying - don't take out your frustration on users that are only spending their time trying to help you."

Man we're done. Earlier you came in with "sorry for trying to help." and then you're insulting me with "You really need to pay attention."

I appreciate the help but I'm not doing the passive aggressive BS.
 
Now I can't remember what the APC's use as a client, years ago I seem to remember an APC specific client, not sure if this would work: https://wiki.debian.org/apcupsd

Second vote here for apcupsd. It's old, simple, and not flashy, but in my experience, if you have an APC UPS with one of their management cards, this package has a huge propensity to "just work". I installed it on my Proxmox host and had automated shutdown working in less than an hour. apcupsd does one thing--communicate with APC UPSes--and does it well. Accordingly, it is easier to set up than NUT or a generic SNMP solution. I set precisely 4 options in apcupsd.conf and had communication established.

Code:
UPSNAME
DEVICE
UPSCABLE
UPSTYPE

Of course on the NMC side, I also added the PVE host as a PCNS client and set a PCNS username/password.

I also set the following:

Code:
TIMEOUT 60
ANNOY 0
ANNOYDELAY 0

For me, the goal here is to only try to survive momentary power interruptions. Proxmox can take a long time to shut down as a consequence of guest shutdowns and dependency chains, so it is prudent to not wait until the UPS battery is low. apcupsd is of course not required on guests since Proxmox will shutdown guests on its own as a consequence of the host shutdown request initiated by apcupsd (apcupsd by default just invokes /sbin/shutdown -h now).

As an aside, apcupsd works equally well across Linux distributions as it does on Windows. Its simple effectiveness is a big part of why I always use APC UPSes and equip them with a NMC. You get the benefits of the APC PCNS functionality on many platforms without the burden of the awful APC PowerChute software.
 
Last edited:
  • Like
Reactions: dj423 and waltar
Second vote here for apcupsd. It's old, simple, and not flashy, but in my experience, if you have an APC UPS with one of their management cards, this package has a huge propensity to "just work".

I figured it was a pretty simple process, as I don't even remember having to struggle with it, glad it is still an option. Hopefully the OP gets it sorted out...
 
<SNIP> I set precisely 4 options in apcupsd.conf and had communication established.

Code:
UPSNAME
DEVICE
UPSCABLE
UPSTYPE

<SNIP>
That's are only empty keywords. Please provide the associated values (i.e. for NMC-Type ap964x) also (IP maybe sanitized) for a working config. The inet is full of desperate questions from users where this "precisely 4 options" doesn't work at all. Thank you in advance.

Christian