-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
can't get nk-snmp-deviceinfo to work #7
Comments
Hi, do you think you can try to install nelkit 0.0.4 and test with that version? I think I know what's going on and it might be an old bug with earlier versions of nelsnmp. |
[root@lab ~]# pip install -U nelkit lab$ nk-snmp-deviceinfo -H hostname -P 3 -L authPriv -a SHA -X AES -U v3PDTuser -A pass_auth -X pass_priv |
found the issue. option -O isn't optional, it's mandatory. Also "standard" and "with_status" give the same results. Thanks |
Hi, I think the problem is that there's a bug in the code which parses arguments. Can you change to a small "-x" for the encryption algorithm? I.e The -o option is probably a visual bug after copying some of the code from another library I have (nelmon). To be honest it was a while since I looked at this code and it would need a cleanup in order to be a bit more robust. |
Hi,
Thank you for writing this useful tool. However, I can't get nk-snmp-deviceinfo to work properly.
I installed it without error but when I tried to use it against my SNMPv3 device (Arista, Cisco, Junos, doesn't matter), I get the same error every time.
lab$ nk-snmp-deviceinfo -H hostname -P 3 -L authPriv -a SHA -X AES -U v3PDTuser -A pass_auth -X pass_priv
Traceback (most recent call last):
File "/usr/bin/nk-snmp-deviceinfo", line 11, in
load_entry_point('nelkit==0.0.3', 'console_scripts', 'nk-snmp-deviceinfo')()
File "/usr/lib/python2.7/site-packages/nelkit/cli/snmp_deviceinfo.py", line 15, in main
hostinfo.get_all()
File "/usr/lib/python2.7/site-packages/nelsnmp/hostinfo/device.py", line 46, in get_all
data = self._snmp.get(*oids)
File "/usr/lib/python2.7/site-packages/nelsnmp/snmp.py", line 232, in get
cmdGen = cmdgen.CommandGenerator()
File "/usr/lib/python2.7/site-packages/pysnmp/entity/rfc3413/oneliner/cmdgen.py", line 168, in init
self.snmpEngine = snmpEngine or SnmpEngine()
File "/usr/lib/python2.7/site-packages/pysnmp/entity/engine.py", line 63, in init
self.msgAndPduDsp = MsgAndPduDispatcher()
File "/usr/lib/python2.7/site-packages/pysnmp/proto/rfc3412.py", line 32, in init
'SNMP-TARGET-MIB', 'SNMP-USER-BASED-SM-MIB'
File "/usr/lib/python2.7/site-packages/pysnmp/smi/builder.py", line 362, in loadModules
self.loadModule(modName, **userCtx)
File "/usr/lib/python2.7/site-packages/pysnmp/smi/builder.py", line 330, in loadModule
'MIB module "%s" load error: %s' % (modPath, traceback.format_exception(*sys.exc_info()))
pysnmp.smi.error.MibLoadError: MIB module "/usr/lib/python2.7/site-packages/pysnmp/smi/mibs/SNMPv2-MIB.pyc" load error: ['Traceback (most recent call last):\n', ' File "/usr/lib/python2.7/site-packages/pysnmp/smi/builder.py", line 325, in loadModule\n exec (modData, g)\n', ' File "/tmp/pip-build-jhHD1l/pysnmp/pysnmp/smi/mibs/SNMPv2-MIB.py", line 27, in \n', ' File "/usr/lib/python2.7/site-packages/pysnmp/proto/rfc1902.py", line 206, in subtype\n return univ.OctetString.subtype(self, *args, **kwargs).setFixedLength(self.getFixedLength())\n', ' File "/usr/lib/python2.7/site-packages/pyasn1/type/base.py", line 122, in subtype\n value = self._value\n', "AttributeError: 'DisplayString' object has no attribute '_value'\n"]
The text was updated successfully, but these errors were encountered: