[Nut-upsdev] SNMPv3

Tim Rice tim at multitalents.net
Tue Jan 29 18:18:26 UTC 2013


nut-2.6.5
Scientific Linux 6.3
APC AP9630 management card

My basic question is, does nut's SNMPv3 implementation work?

I have this in /etc/ups/ups.conf
......
[tfapc01]
	driver = snmp-ups
	port = tfapc01.testfest.ixorg.org
	mibs = apcc
	snmp_version = v3
	secLevel = authPriv
	secName = tfsnmpprof1
	authPassword = ralow6moHet7zoboP8
	privPassword = tuseL8Pakaz9degim7
	authProtocol=MD5
	privProtocol=AES
	desc = "APC SU700 SNMP v3 device, with the highest security level"
......

Now I test
/sbin/snmp-ups -DDD -a tfapc01
Network UPS Tools - Generic SNMP UPS driver 0.68 (2.6.5)
   0.000000	debug level is '3'
   0.000600	SNMP UPS driver : entering upsdrv_initups()
   0.000618	SNMP UPS driver : entering nut_snmp_init(snmp-ups)
   0.047231	SNMP UPS driver : entering load_mib2nut(apcc)
   0.047243	load_mib2nut: trying classic method with 'apcc' mib
   0.047248	Entering nut_snmp_get_str()
   0.047252	nut_snmp_get(.1.3.6.1.4.1.318.1.1.1.1.1.1.0)
   0.051083	Unknown mibs value: apcc

Doesn't look good. But if we use snmpget from the net-snmp package it works.

snmpget -Cf -v 3 -u tfsnmpprof1 -l authPriv -a MD5 -A ralow6moHet7zoboP8 \
-x AES -X tuseL8Pakaz9degim7 tfapc01 .1.3.6.1.4.1.318.1.1.1.1.1.1.0
No log handling enabled - turning on stderr logging
SNMPv2-SMI::enterprises.318.1.1.1.1.1.1.0 = STRING: "SMART-UPS 700"

Now if we drop the "snmp_version" line from ups.conf and SNMPv1 is enabled
on the APC with default public read private write, NUT will happily use
its defaults to talk to the APC using v1 even though you have configured
the ups.conf settings for v3 following documentation examples.

Note: contrary to the documentation saying that valid values for
snmp_version are v1 or v2c, if we look at line 348 of
nut-2.6.5/drivers/snmp-ups.c we see that v3 is also a valid choice.

So is anyone actually using SNMPv3 with NUT?

Thanks.

-- 
Tim Rice				Multitalents	(707) 456-1146
tim at multitalents.net					(707) 887-1469





More information about the Nut-upsdev mailing list