pysnmp-dev Mailing List for SNMP library for Python (Page 7)
Brought to you by:
elie
You can subscribe to this list here.
2002 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(1) |
Jul
|
Aug
(1) |
Sep
(2) |
Oct
|
Nov
|
Dec
|
---|---|---|---|---|---|---|---|---|---|---|---|---|
2003 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(2) |
Oct
|
Nov
|
Dec
|
2004 |
Jan
|
Feb
|
Mar
(2) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(6) |
Dec
|
2005 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(4) |
Dec
(3) |
2006 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(5) |
2007 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(4) |
Sep
(1) |
Oct
|
Nov
(3) |
Dec
|
2008 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(2) |
Sep
|
Oct
|
Nov
|
Dec
|
2009 |
Jan
(1) |
Feb
(1) |
Mar
(5) |
Apr
(1) |
May
(4) |
Jun
(2) |
Jul
|
Aug
|
Sep
(3) |
Oct
(3) |
Nov
(1) |
Dec
|
2010 |
Jan
(2) |
Feb
|
Mar
(2) |
Apr
|
May
|
Jun
|
Jul
(2) |
Aug
|
Sep
|
Oct
(4) |
Nov
(8) |
Dec
|
2011 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(2) |
Jun
(9) |
Jul
(4) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2012 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(2) |
Jul
|
Aug
|
Sep
|
Oct
(3) |
Nov
(2) |
Dec
(2) |
2013 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(2) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2014 |
Jan
|
Feb
(2) |
Mar
|
Apr
|
May
(2) |
Jun
(3) |
Jul
|
Aug
(2) |
Sep
(3) |
Oct
(3) |
Nov
(4) |
Dec
|
2015 |
Jan
|
Feb
(4) |
Mar
(2) |
Apr
(1) |
May
(2) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2016 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(3) |
Jun
|
Jul
|
Aug
(3) |
Sep
|
Oct
|
Nov
|
Dec
|
2017 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(1) |
Oct
|
Nov
|
Dec
(1) |
2018 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(1) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2019 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(3) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2020 |
Jan
|
Feb
|
Mar
|
Apr
(2) |
May
(1) |
Jun
|
Jul
|
Aug
(11) |
Sep
(20) |
Oct
(18) |
Nov
(5) |
Dec
|
2021 |
Jan
(5) |
Feb
(11) |
Mar
(19) |
Apr
(4) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(1) |
Nov
|
Dec
(1) |
2022 |
Jan
(2) |
Feb
(1) |
Mar
(1) |
Apr
(1) |
May
(1) |
Jun
|
Jul
(4) |
Aug
(1) |
Sep
(1) |
Oct
(1) |
Nov
|
Dec
|
2023 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(1) |
Aug
|
Sep
|
Oct
|
Nov
(1) |
Dec
|
From: Ilya E. <il...@gl...> - 2014-02-28 05:51:41
|
Hi Scott, Chances are smidump can’t find MIBs imported by F5-BIGIP-SYSTEM-MIB.txt so make sure those are in its search path. You could debug this issue further if run: smidump -f python F5-BIGIP-SYSTEM-MIB.txt to see more of its error reporting. -ilya On 28 Feb 2014, at 07:03, Bossi, Scott <Sco...@fm...> wrote: > Hi, > > I’m new to python and pysnmp (but not snmp). I’m trying to build a python module using the build-pysnmp-mib tool. I have the mibs in a directory, and execute the command below, but I get an error. Can anyone help me? > > sudo build-pysnmp-mib -o F5-BIGIP-SYSTEM-MIB.py F5-BIGIP-SYSTEM-MIB.txt > Empty input > smidump -k -f python F5-BIGIP-SYSTEM-MIB.txt | /usr/bin/libsmi2pysnmp fails > make sure you are using libsmi version > 0.4.5 (or svn) > |
From: Bossi, S. <Sco...@fm...> - 2014-02-28 03:30:08
|
Hi, I'm new to python and pysnmp (but not snmp). I'm trying to build a python module using the build-pysnmp-mib tool. I have the mibs in a directory, and execute the command below, but I get an error. Can anyone help me? sudo build-pysnmp-mib -o F5-BIGIP-SYSTEM-MIB.py F5-BIGIP-SYSTEM-MIB.txt Empty input smidump -k -f python F5-BIGIP-SYSTEM-MIB.txt | /usr/bin/libsmi2pysnmp fails make sure you are using libsmi version > 0.4.5 (or svn) |
From: Ilya E. <il...@gl...> - 2013-05-21 05:03:40
|
Hi Isaku, As a pysnmp developer I'm still planning AgentX support. But no real work has been done yet. So once you implement it, I'd happily incorporate your work into pysnmp package. -ilya On May 21, 2013, at 3:27, Isaku Yamahata <yam...@va...> wrote: > Hi. I'm interested in agentX support. > I'm aware that it is listed at http://pysnmp.sourceforge.net/development.html > > Is anyone already working on it? > Or I'd like to implement it if no. > > thanks, > -- > yamahata > > ------------------------------------------------------------------------------ > Try New Relic Now & We'll Send You this Cool Shirt > New Relic is the only SaaS-based application performance monitoring service > that delivers powerful full stack analytics. Optimize and monitor your > browser, app, & servers with just a few lines of code. Try New Relic > and get this awesome Nerd Life shirt! http://p.sf.net/sfu/newrelic_d2d_may > _______________________________________________ > pysnmp-dev mailing list > pys...@li... > https://lists.sourceforge.net/lists/listinfo/pysnmp-dev |
From: Isaku Y. <yam...@va...> - 2013-05-20 23:27:17
|
Hi. I'm interested in agentX support. I'm aware that it is listed at http://pysnmp.sourceforge.net/development.html Is anyone already working on it? Or I'd like to implement it if no. thanks, -- yamahata |
From: Ilya E. <il...@gl...> - 2012-12-20 12:37:53
|
Hi Jacek, That piece of code has been radically reworked in 4.2.4 branch. Could you please try out this tarball: http://sourceforge.net/projects/pysnmp/files/pysnmp/4.2.4/pysnmp-4.2.4rc5.tar.gz/download and alert me in case of any issues. thanks, Ilya > In the PLD Linux distribution Python 2.x modules are distributed in > compiled form only (*.{pyc,pyo}, no *.py), this is also done for the MIB > modules included in pysnmp. PySNMP does include code to handle that, > but it is broken in the 4.2.3 release: > > DBG: loadModules: trying SNMPv2-MIB at DirMibSource('/usr/share/python2.7/site-packages/pysnmp/smi/mibs') > DBG: bad magic in SNMPv2-MIB.pyc > DBG: file SNMPv2-MIB.pyc mtime -1 > DBG: file SNMPv2-MIB.py mtime -1 > > The magic bytes are valid in the file, but they get destroyed by the _getData() > method before the test in read() method. > > The patch below fixes the problem. |
From: Jacek K. <ja...@ja...> - 2012-12-20 11:52:45
|
Hi, In the PLD Linux distribution Python 2.x modules are distributed in compiled form only (*.{pyc,pyo}, no *.py), this is also done for the MIB modules included in pysnmp. PySNMP does include code to handle that, but it is broken in the 4.2.3 release: DBG: loadModules: trying SNMPv2-MIB at DirMibSource('/usr/share/python2.7/site-packages/pysnmp/smi/mibs') DBG: bad magic in SNMPv2-MIB.pyc DBG: file SNMPv2-MIB.pyc mtime -1 DBG: file SNMPv2-MIB.py mtime -1 The magic bytes are valid in the file, but they get destroyed by the _getData() method before the test in read() method. The patch below fixes the problem. Greets, Jacek diff -dur pysnmp-4.2.3.orig/pysnmp/smi/builder.py pysnmp-4.2.3/pysnmp/smi/builder.py --- pysnmp-4.2.3.orig/pysnmp/smi/builder.py 2012-08-29 23:22:35.000000000 +0200 +++ pysnmp-4.2.3/pysnmp/smi/builder.py 2012-12-20 10:49:27.000000000 +0100 @@ -138,7 +138,7 @@ def _getData(self, f, mode=None): data = self.__loader.get_data(os.path.join(self._srcName, f)) - if sys.version_info[0] <= 2: + if sys.version_info[0] <= 2 and "b" not in mode: data = data.replace('\r\n', '\n') return data @@ -160,7 +160,7 @@ try: if f in os.listdir(self._srcName): # make FS case-sensitive data = open(os.path.join(self._srcName, f), mode).read() - if sys.version_info[0] <= 2: + if sys.version_info[0] <= 2 and "b" not in mode: data = data.replace('\r\n', '\n') return data except OSError: |
From: Ilya E. <il...@gl...> - 2012-11-09 16:59:19
|
Hi Lisa, If that is the ASN.1 data processing function, then you should find it in the pyasn1 package. Package web-site has some relevant documentation - http://pyasn1.sourceforge.net. -ilya On Fri, 9 Nov 2012, Lisa Guadagna wrote: > Is there documentation which describes this function? Where can I get it if > so? I have done google search and read all material, but can not find it. > > thanks in advance! > Lisa Guadagna > |
From: Lisa G. <lis...@gm...> - 2012-11-09 16:56:38
|
Is there documentation which describes this function? Where can I get it if so? I have done google search and read all material, but can not find it. thanks in advance! Lisa Guadagna |
From: Ilya E. <il...@gl...> - 2012-10-14 20:55:11
|
That is fixed in rc2. Please give it a try: http://sourceforge.net/projects/pysnmp/files/pysnmp/4.2.4/pysnmp-4.2.4rc2.tar.gz/download Thanks for the analysis! -ilya On Oct 11, 2012, at 6:07 AM, young-kyun Kim wrote: > Hi.. > > I do test more. > I test each smi/builder.py revision from 4.2.3 tag to 4.2.3 tag. > 1.43 revision works fine, but 1.44 revision doesn't work with py2exe. > > Below link is diff 1.44 to 1.43. > http://pysnmp.cvs.sourceforge.net/viewvc/pysnmp/pysnmp/pysnmp/smi/builder.py?r1=1.43&r2=1.44 > > > 2012/10/10 young-kyun Kim <mar...@gm...> > Hi > > pysnmp 4.2.2 and older version works fine with py2exe. > But pysnmp 4.2.3 and 4.2.4rc0 don't work with py2exe. > > When run py2exe binary with pysnmp 4.2.3, below error occurred. > ------------------------------------------------------------------------------- > mibBuilder = builder.MibBuilder().loadModules('SNMPv2-MIB', 'Printer-MIB') > ------------------------------------------------------------------------------- > Traceback (most recent call last): > File "prt_agent.py", line 54, in <module> > File "prt_agent.py", line 39, in main > File "zipextimporter.pyo", line 82, in load_module > File "prt_main.pyo", line 12, in <module> > File "zipextimporter.pyo", line 82, in load_module > File "scan_snmp_prt.pyo", line 12, in <module> > File "zipextimporter.pyo", line 82, in load_module > File "prt_snmp_pysnmp.pyo", line 13, in <module> > File "pysnmp\smi\builder.pyo", line 271, in loadModules > SmiError: MIB file "SNMPv2-MIB.py[co]" not found in search path > ------------------------------------------------------------------------------- > > pysnmp.smi.mibs, pysnmp.smi.mibs.instances packages are included already. > ------------------------------------------------------------------------------- > ..... > packages = ["pysnmp.smi.mibs", "pysnmp.smi.mibs.instances", "pysnmp_mibs"] > ..... > setup( > .... > options = {"py2exe": {"compressed": 1, > .... > "packages": packages, > ..... > ------------------------------------------------------------------------------- > > When __AbstractMibSource.read() method and ZipMibSource class in smi/builder.py overwritten with pysnmp 4.2.2 contents, > my py2exe binary works fine. > > smi/builder.py of pysnmp 4.2.3 may has problem about py2exe. |
From: young-kyun K. <mar...@gm...> - 2012-10-11 02:07:24
|
Hi.. I do test more. I test each smi/builder.py revision from 4.2.3 tag to 4.2.3 tag. 1.43 revision works fine, but 1.44 revision doesn't work with py2exe. Below link is diff 1.44 to 1.43. http://pysnmp.cvs.sourceforge.net/viewvc/pysnmp/pysnmp/pysnmp/smi/builder.py?r1=1.43&r2=1.44 2012/10/10 young-kyun Kim <mar...@gm...> > Hi > > pysnmp 4.2.2 and older version works fine with py2exe. > But pysnmp 4.2.3 and 4.2.4rc0 don't work with py2exe. > > When run py2exe binary with pysnmp 4.2.3, below error occurred. > > ------------------------------------------------------------------------------- > mibBuilder = builder.MibBuilder().loadModules('SNMPv2-MIB', 'Printer-MIB') > > ------------------------------------------------------------------------------- > Traceback (most recent call last): > File "prt_agent.py", line 54, in <module> > File "prt_agent.py", line 39, in main > File "zipextimporter.pyo", line 82, in load_module > File "prt_main.pyo", line 12, in <module> > File "zipextimporter.pyo", line 82, in load_module > File "scan_snmp_prt.pyo", line 12, in <module> > File "zipextimporter.pyo", line 82, in load_module > File "prt_snmp_pysnmp.pyo", line 13, in <module> > File "pysnmp\smi\builder.pyo", line 271, in loadModules > SmiError: MIB file "SNMPv2-MIB.py[co]" not found in search path > > ------------------------------------------------------------------------------- > > pysnmp.smi.mibs, pysnmp.smi.mibs.instances packages are included already. > > ------------------------------------------------------------------------------- > ..... > packages = ["pysnmp.smi.mibs", "pysnmp.smi.mibs.instances", "pysnmp_mibs"] > ..... > setup( > .... > options = {"py2exe": {"compressed": 1, > .... > "packages": packages, > ..... > > ------------------------------------------------------------------------------- > > When __AbstractMibSource.read() method and ZipMibSource class in > smi/builder.py overwritten with pysnmp 4.2.2 contents, > my py2exe binary works fine. > > smi/builder.py of pysnmp 4.2.3 may has problem about py2exe. > > |
From: young-kyun K. <mar...@gm...> - 2012-10-10 10:46:34
|
Hi pysnmp 4.2.2 and older version works fine with py2exe. But pysnmp 4.2.3 and 4.2.4rc0 don't work with py2exe. When run py2exe binary with pysnmp 4.2.3, below error occurred. ------------------------------------------------------------------------------- mibBuilder = builder.MibBuilder().loadModules('SNMPv2-MIB', 'Printer-MIB') ------------------------------------------------------------------------------- Traceback (most recent call last): File "prt_agent.py", line 54, in <module> File "prt_agent.py", line 39, in main File "zipextimporter.pyo", line 82, in load_module File "prt_main.pyo", line 12, in <module> File "zipextimporter.pyo", line 82, in load_module File "scan_snmp_prt.pyo", line 12, in <module> File "zipextimporter.pyo", line 82, in load_module File "prt_snmp_pysnmp.pyo", line 13, in <module> File "pysnmp\smi\builder.pyo", line 271, in loadModules SmiError: MIB file "SNMPv2-MIB.py[co]" not found in search path ------------------------------------------------------------------------------- pysnmp.smi.mibs, pysnmp.smi.mibs.instances packages are included already. ------------------------------------------------------------------------------- ..... packages = ["pysnmp.smi.mibs", "pysnmp.smi.mibs.instances", "pysnmp_mibs"] ..... setup( .... options = {"py2exe": {"compressed": 1, .... "packages": packages, ..... ------------------------------------------------------------------------------- When __AbstractMibSource.read() method and ZipMibSource class in smi/builder.py overwritten with pysnmp 4.2.2 contents, my py2exe binary works fine. smi/builder.py of pysnmp 4.2.3 may has problem about py2exe. |
From: Ilya E. <il...@gl...> - 2012-06-25 22:47:49
|
Hi Kailash, That's a bug in pysnmp. The patch is attached to this message. The same fix will also appear in the next pysnmp release candidate (within a week). -ilya |
From: Kailash B. <kai...@gm...> - 2012-06-25 11:26:12
|
Hi, I get the following error, when sending SNMP Traps from Windows. The SNMP Traps are generated when Snare agent is started or stopped. 2012-06-25_10:08:45.82091 snmpEngine.transportDispatcher.runDispatcher() 2012-06-25_10:08:45.82092 File "/Library/Python/2.7/site-packages/pysnmp-4.2.3rc2-py2.7.egg/pysnmp/carrier/asynsock/dispatch.py", line 33, in runDispatcher 2012-06-25_10:08:45.83803 poll(timeout and timeout or self.timeout, self.__sockMap) 2012-06-25_10:08:45.86344 File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/asyncore.py", line 151, in poll 2012-06-25_10:08:45.87814 read(obj) 2012-06-25_10:08:45.87818 File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/asyncore.py", line 83, in read 2012-06-25_10:08:45.87826 obj.handle_error() 2012-06-25_10:08:45.87828 File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/asyncore.py", line 79, in read 2012-06-25_10:08:45.87835 obj.handle_read_event() 2012-06-25_10:08:45.87837 File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/asyncore.py", line 438, in handle_read_event 2012-06-25_10:08:45.87956 self.handle_read() 2012-06-25_10:08:45.87962 File "/Library/Python/2.7/site-packages/pysnmp-4.2.3rc2-py2.7.egg/pysnmp/carrier/asynsock/dgram/base.py", line 73, in handle_read 2012-06-25_10:08:45.87988 self._cbFun(self, transportAddress, incomingMessage) 2012-06-25_10:08:45.87990 File "/Library/Python/2.7/site-packages/pysnmp-4.2.3rc2-py2.7.egg/pysnmp/carrier/base.py", line 46, in _cbFun 2012-06-25_10:08:45.90422 self, transportDomain, transportAddress, incomingMessage 2012-06-25_10:08:45.93224 File "/Library/Python/2.7/site-packages/pysnmp-4.2.3rc2-py2.7.egg/pysnmp/entity/engine.py", line 61, in __receiveMessageCbFun 2012-06-25_10:08:45.95121 self, transportDomain, transportAddress, wholeMsg 2012-06-25_10:08:45.96927 File "/Library/Python/2.7/site-packages/pysnmp-4.2.3rc2-py2.7.egg/pysnmp/proto/rfc3412.py", line 406, in receiveMessage 2012-06-25_10:08:45.98982 stateReference 2012-06-25_10:08:46.02192 File "/Library/Python/2.7/site-packages/pysnmp-4.2.3rc2-py2.7.egg/pysnmp/entity/rfc3413/ntfrcv.py", line 46, in processPdu 2012-06-25_10:08:46.04184 PDU = rfc2576.v1ToV2(PDU) 2012-06-25_10:08:46.09506 File "/Library/Python/2.7/site-packages/pysnmp-4.2.3rc2-py2.7.egg/pysnmp/proto/proxy/rfc2576.py", line 111, in v1ToV2 2012-06-25_10:08:46.10565 (v1.apiTrapPDU.getSpecificTrap(v1Pdu),) 2012-06-25_10:08:46.13687 File "/Library/Python/2.7/site-packages/pyasn1/type/univ.py", line 434, in __add__ 2012-06-25_10:08:46.14700 def __add__(self, other): return self.clone(self._value + other) 2012-06-25_10:08:46.16386 File "/Library/Python/2.7/site-packages/pyasn1/type/base.py", line 98, in clone 2012-06-25_10:08:46.19999 return self.__class__(value, tagSet, subtypeSpec) 2012-06-25_10:08:46.24092 File "/Library/Python/2.7/site-packages/pyasn1/type/base.py", line 64, in __init__ 2012-06-25_10:08:46.24100 value = self.prettyIn(value) 2012-06-25_10:08:46.24103 File "/Library/Python/2.7/site-packages/pyasn1/type/univ.py", line 494, in prettyIn 2012-06-25_10:08:46.24132 'Invalid sub-ID in %s at %s' % (value, self.__class__.__name__) 2012-06-25_10:08:46.24143 pyasn1.error.PyAsn1Error: Invalid sub-ID in (1, 3, 6, 1, 4, 1, 311, 1, 13, 1, 5, 83, 78, 65, 82, 69, 0, Integer(105)) at ObjectIdentifier System Detail:- Mac OSX 10.7.3 pysnmp 4.2.3rc2 Any suggestion is appreciated. regards -- Kailash Budhathoki |
From: chengkeke <che...@16...> - 2011-07-15 03:00:35
|
Hi All,Adding environment information:Pysnmp4.1.11a, Python2.5.AES is CFB AES 128.And same trap information can be received and parsing by MIB browser.I have an issue: I can't receive trap when set v3 user privacy protocol as AES. I can receive the trap when set it as None and DES.Could you please help me on it? Thanks a lot.snmp trap command: snmptrap -v3 -u read -l authPriv -a MD5 -A 12345678 -x AES -X 12345678 192.168.0.10 "" .1.3.6.1.4.1.XX.2.2.1.1 1.3.6.1.4.1.XX.2.2.2.18 s "00:24:82:2D:A3:33"Here is the code of add v3 user: [set it as config.usmAesCfb128Protocol] snmpEngine = engine.SnmpEngine() host = '192.168.0.10' port = 162 # Setup transport endpoint config.addSocketTransport( snmpEngine, udp.domainName, udp.UdpSocketTransport().openServerMode((host, port)) ) print 'UDP service [%s:%s] is open' % (host, port) # v1/2 setup config.addV1System(snmpEngine, 'public', 'public') # v3 setup config.addV3User( snmpEngine, 'read', config.usmHMACMD5AuthProtocol, '12345678', config.usmAesCfb128Protocol, '12345678', ) print 'V3 User created successfully' # Apps registration ntfrcv.NotificationReceiver(snmpEngine, cbFun) snmpEngine.transportDispatcher.jobStarted(1) # this job would never finish snmpEngine.transportDispatcher.runDispatcher() Cherry Cheng |
From: chengkeke <che...@16...> - 2011-07-14 02:02:05
|
Pysnmp version I used is 4.1.11a. Python 2.5. At 2011-07-14 09:23:46,chengkeke <che...@16...> wrote: Hi All, I have an issue: I can't receive trap when set v3 user privacy protocol as AES. I can receive the trap when set it as None and DES. Could you please help me on it? Thanks a lot. snmp trap command: snmptrap -v3 -u read -l authPriv -a MD5 -A 12345678 -x AES -X 12345678 192.168.0.10 "" .1.3.6.1.4.1.XX.2.2.1.1 1.3.6.1.4.1.XX.2.2.2.18 s "00:24:82:2D:A3:33" Here is the code of add v3 user: [set it as config.usmAesCfb128Protocol] snmpEngine = engine.SnmpEngine() host = '192.168.0.10' port = 162 # Setup transport endpoint config.addSocketTransport( snmpEngine, udp.domainName, udp.UdpSocketTransport().openServerMode((host, port)) ) print 'UDP service [%s:%s] is open' % (host, port) # v1/2 setup config.addV1System(snmpEngine, 'public', 'public') # v3 setup config.addV3User( snmpEngine, 'read', config.usmHMACMD5AuthProtocol, '12345678', config.usmAesCfb128Protocol, '12345678', #'\x80\x00\x1F\x88\x80\x72\x12\x67\xFD\x4D\xF2\x4F\x07', # '\x80\x00\x4f\xb8\x1c\x3d\xaf\xe6' # ContextEngineID of # Notification Originator ) print 'V3 User created successfully' # Apps registration ntfrcv.NotificationReceiver(snmpEngine, cbFun) snmpEngine.transportDispatcher.jobStarted(1) # this job would never finish snmpEngine.transportDispatcher.runDispatcher() Cherry Cheng |
From: chengkeke <che...@16...> - 2011-07-14 01:24:06
|
Hi All, I have an issue: I can't receive trap when set v3 user privacy protocol as AES. I can receive the trap when set it as None and DES. Could you please help me on it? Thanks a lot. snmp trap command: snmptrap -v3 -u read -l authPriv -a MD5 -A 12345678 -x AES -X 12345678 192.168.0.10 "" .1.3.6.1.4.1.XX.2.2.1.1 1.3.6.1.4.1.XX.2.2.2.18 s "00:24:82:2D:A3:33" Here is the code of add v3 user: [set it as config.usmAesCfb128Protocol] snmpEngine = engine.SnmpEngine() host = '192.168.0.10' port = 162 # Setup transport endpoint config.addSocketTransport( snmpEngine, udp.domainName, udp.UdpSocketTransport().openServerMode((host, port)) ) print 'UDP service [%s:%s] is open' % (host, port) # v1/2 setup config.addV1System(snmpEngine, 'public', 'public') # v3 setup config.addV3User( snmpEngine, 'read', config.usmHMACMD5AuthProtocol, '12345678', config.usmAesCfb128Protocol, '12345678', #'\x80\x00\x1F\x88\x80\x72\x12\x67\xFD\x4D\xF2\x4F\x07', # '\x80\x00\x4f\xb8\x1c\x3d\xaf\xe6' # ContextEngineID of # Notification Originator ) print 'V3 User created successfully' # Apps registration ntfrcv.NotificationReceiver(snmpEngine, cbFun) snmpEngine.transportDispatcher.jobStarted(1) # this job would never finish snmpEngine.transportDispatcher.runDispatcher() Cherry Cheng |
From: nver i. <nv...@gm...> - 2011-06-24 08:43:24
|
Hi Ilya, Your patch is exactly what I did to overcome this issue on my side. Everything seems to be working fine. I just was afraid of any hidden potential problem with this approach I was not aware of. If you don't see any, I assume we are done with this bug. Thanks for your help. 2011/6/24 Ilya Etingof <il...@gl...> > > That seems like a bug in pysnmp. Will the following patch solve this issue? > > Please let me know. > > *** pysnmp/carrier/twisted/**dispatch.py 20 Jan 2011 17:11:43 -0000 > 1.2 > --- pysnmp/carrier/twisted/**dispatch.py 24 Jun 2011 06:32:03 -0000 > *************** > *** 52,56 **** > self.__transportCount = self.__transportCount - 1 > > > # The last transport has been removed, stop the timeout > ! if self.__transportCount > 0 and self.loopingcall.running: > self.loopingcall.stop() > --- 52,56 ---- > self.__transportCount = self.__transportCount - 1 > > > # The last transport has been removed, stop the timeout > ! if self.__transportCount == 0 and self.loopingcall.running: > self.loopingcall.stop() > > On Thu, 23 Jun 2011, nver irc wrote: > > Hi Ilya, >> >> Could you please review the stopping condition for >> TwistedDispatcher.loopingcall in TwistedDispatcher.**unregisterTransport() >> ? >> >> # The last transport has been removed, stop the timeout >> if self.__transportCount > 0 and self.loopingcall.running: >> self.loopingcall.stop() >> >> It seems that loopingcall.stop() is called while removing one of multiple >> transports instead of the last one. >> >> Best regards, >> nver >> >> |
From: Ilya E. <il...@gl...> - 2011-06-24 06:33:39
|
That seems like a bug in pysnmp. Will the following patch solve this issue? Please let me know. *** pysnmp/carrier/twisted/dispatch.py 20 Jan 2011 17:11:43 -0000 1.2 --- pysnmp/carrier/twisted/dispatch.py 24 Jun 2011 06:32:03 -0000 *************** *** 52,56 **** self.__transportCount = self.__transportCount - 1 # The last transport has been removed, stop the timeout ! if self.__transportCount > 0 and self.loopingcall.running: self.loopingcall.stop() --- 52,56 ---- self.__transportCount = self.__transportCount - 1 # The last transport has been removed, stop the timeout ! if self.__transportCount == 0 and self.loopingcall.running: self.loopingcall.stop() On Thu, 23 Jun 2011, nver irc wrote: > Hi Ilya, > > Could you please review the stopping condition for > TwistedDispatcher.loopingcall in TwistedDispatcher.unregisterTransport() ? > > # The last transport has been removed, stop the timeout > if self.__transportCount > 0 and self.loopingcall.running: > self.loopingcall.stop() > > It seems that loopingcall.stop() is called while removing one of multiple > transports instead of the last one. > > Best regards, > nver > |
From: nver i. <nv...@gm...> - 2011-06-23 09:53:58
|
Hi Ilya, Could you please review the stopping condition for TwistedDispatcher.loopingcall in TwistedDispatcher.unregisterTransport() ? # The last transport has been removed, stop the timeout if self.__transportCount > 0 and self.loopingcall.running: self.loopingcall.stop() It seems that loopingcall.stop() is called while removing one of multiple transports instead of the last one. Best regards, nver |
From: chengkeke <che...@16...> - 2011-06-16 03:09:29
|
Hi Ilya, It is really helpful for me. I read the whole FAQ and knew how to get snmp agent ip address. In our product, only support v2 and v3 agent and trap. For v2 trap, there is a sample in pysnmp tar, it can get trap version and other information. It is ok for our testing. Although there is no community information. For v3 trap, we need to set trap version is 3, and set security name, auth and privacy settings, after that, we will open a trap receive in one computer, and check we receive trap information and also the setting are correct, including agent ip address, security name, auth and privacy settings. Is it possible to get the information (security name, auth and privacy settings)? If yes, could you please give me an example? Thanks. Cherry At 2011-06-15 18:48:51,"Ilya Etingof" <il...@gl...> wrote: > >> Now, I can get snmp v3 trap base on examples of v3 in pysnmp web site. I >> used the version pysnmp-4.1.10a. >> >> Here are my new questions. >> >> 1. There two network card in my computer. If set host as 127.0.0.1, >> local IP is 192.168.0.100, can't get trap information. After I change >> host to 192.168.0.100, it works well.So we can't set host as >> 127.0.0.1(want to receive all traps sent to local computer), is it >> correct? > >So, if you need your Receiver to listen on several IP interfaces, you have >to register each of your local endpoints (IP:port) as a separate >transport at your SNMP engine. I've added this hint to a FAQ: > >http://pysnmp.sourceforge.net/faq.html#6 > >> 2. In the sample, we only get name, val in varBinds. Can we get other >> information, for example, sec-name, auth protocol, auth key, privacy >> protocol, privacy key and agent ip address? [We can get details >> information in v1.] In pysnmp\proto\api, we only have v1 and v2c. > >The short answer is - you should not have to know that. Please, find the >long answer in the [newly added] hint in the FAQ: > >http://pysnmp.sourceforge.net/faq.html#7 > >-ilya |
From: Ilya E. <il...@gl...> - 2011-06-15 10:49:02
|
> Now, I can get snmp v3 trap base on examples of v3 in pysnmp web site. I > used the version pysnmp-4.1.10a. > > Here are my new questions. > > 1. There two network card in my computer. If set host as 127.0.0.1, > local IP is 192.168.0.100, can't get trap information. After I change > host to 192.168.0.100, it works well.So we can't set host as > 127.0.0.1(want to receive all traps sent to local computer), is it > correct? So, if you need your Receiver to listen on several IP interfaces, you have to register each of your local endpoints (IP:port) as a separate transport at your SNMP engine. I've added this hint to a FAQ: http://pysnmp.sourceforge.net/faq.html#6 > 2. In the sample, we only get name, val in varBinds. Can we get other > information, for example, sec-name, auth protocol, auth key, privacy > protocol, privacy key and agent ip address? [We can get details > information in v1.] In pysnmp\proto\api, we only have v1 and v2c. The short answer is - you should not have to know that. Please, find the long answer in the [newly added] hint in the FAQ: http://pysnmp.sourceforge.net/faq.html#7 -ilya |
From: chengkeke <che...@16...> - 2011-06-15 02:31:03
|
Hi Ilya & all, Now, I can get snmp v3 trap base on examples of v3 in pysnmp web site. I used the version pysnmp-4.1.10a. Here are my new questions. 1. There two network card in my computer. If set host as 127.0.0.1, local IP is 192.168.0.100, can't get trap information. After I change host to 192.168.0.100, it works well.So we can't set host as 127.0.0.1(want to receive all traps sent to local computer), is it correct? 2. In the sample, we only get name, val in varBinds. Can we get other information, for example, sec-name, auth protocol, auth key, privacy protocol, privacy key and agent ip address? [We can get details information in v1.] In pysnmp\proto\api, we only have v1 and v2c. Thanks all. Cherry At 2011-06-15 01:58:08,"Ilya Etingof" <il...@gl...> wrote: > >There's no need for Notification Receiver to configure Originator's >EngineID (as Notification Originator is an authoritative entity in SNMPv3 >terms). > >Therefore I'd advise to fire up your Notification Receiver (without >having ContextEngineID configured to it) and see if it receives traps >from your Originator. > >Please let me know in case of any issues. > >-ilya > >> I have seen the examples in the web site, we need to add v3 user and >> when we receive a trap. >> >> >> One of our device using random engine ID, when sending the v3 trap.Is it possible to receive this kind of trap with pysnmp? If yes, could anyone give me a sample because the example in http://pysnmp.sourceforge.net/examples/4.x/v3arch/manager/ntfrcv.html is to receive notification. >> >> >> config.addV3User( >> snmpEngine, 'test-user', >> config.usmHMACMD5AuthProtocol, 'authkey1', >> config.usmDESPrivProtocol, 'privkey1' >> # '\x80\x00\x4f\xb8\x1c\x3d\xaf\xe6' # ContextEngineID of >> # Notification Originator >> ) |
From: chengkeke <che...@16...> - 2011-06-15 02:21:52
|
Hi ilya, At 2011-06-15 01:58:08,"Ilya Etingof" <il...@gl...> wrote: > >There's no need for Notification Receiver to configure Originator's >EngineID (as Notification Originator is an authoritative entity in SNMPv3 >terms). > >Therefore I'd advise to fire up your Notification Receiver (without >having ContextEngineID configured to it) and see if it receives traps >from your Originator. > >Please let me know in case of any issues. > >-ilya > >> I have seen the examples in the web site, we need to add v3 user and >> when we receive a trap. >> >> >> One of our device using random engine ID, when sending the v3 trap.Is it possible to receive this kind of trap with pysnmp? If yes, could anyone give me a sample because the example in http://pysnmp.sourceforge.net/examples/4.x/v3arch/manager/ntfrcv.html is to receive notification. >> >> >> config.addV3User( >> snmpEngine, 'test-user', >> config.usmHMACMD5AuthProtocol, 'authkey1', >> config.usmDESPrivProtocol, 'privkey1' >> # '\x80\x00\x4f\xb8\x1c\x3d\xaf\xe6' # ContextEngineID of >> # Notification Originator >> ) |
From: Ilya E. <il...@gl...> - 2011-06-14 17:58:18
|
There's no need for Notification Receiver to configure Originator's EngineID (as Notification Originator is an authoritative entity in SNMPv3 terms). Therefore I'd advise to fire up your Notification Receiver (without having ContextEngineID configured to it) and see if it receives traps from your Originator. Please let me know in case of any issues. -ilya > I have seen the examples in the web site, we need to add v3 user and > when we receive a trap. > > > One of our device using random engine ID, when sending the v3 trap.Is it possible to receive this kind of trap with pysnmp? If yes, could anyone give me a sample because the example in http://pysnmp.sourceforge.net/examples/4.x/v3arch/manager/ntfrcv.html is to receive notification. > > > config.addV3User( > snmpEngine, 'test-user', > config.usmHMACMD5AuthProtocol, 'authkey1', > config.usmDESPrivProtocol, 'privkey1' > # '\x80\x00\x4f\xb8\x1c\x3d\xaf\xe6' # ContextEngineID of > # Notification Originator > ) |
From: chengkeke <che...@16...> - 2011-06-13 06:50:20
|
Hi All, I have seen the examples in the web site, we need to add v3 user and when we receive a trap. One of our device using random engine ID, when sending the v3 trap.Is it possible to receive this kind of trap with pysnmp? If yes, could anyone give me a sample because the example in http://pysnmp.sourceforge.net/examples/4.x/v3arch/manager/ntfrcv.html is to receive notification. config.addV3User( snmpEngine, 'test-user', config.usmHMACMD5AuthProtocol, 'authkey1', config.usmDESPrivProtocol, 'privkey1' # '\x80\x00\x4f\xb8\x1c\x3d\xaf\xe6' # ContextEngineID of # Notification Originator ) Thanks all. Cherry Cheng che...@16... |