pysnmp-dev Mailing List for SNMP library for Python (Page 8)
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...> - 2011-05-30 12:50:04
|
This is most likely a MIB / smidump issue. Could you please send it to me for further analysis? -ilya On May 27, 2011, at 10:02 PM, Karan Thakral <kar...@gm...> wrote: > hi > > I am new person to pysnmp. > > I am trying to load some custom mibs using mib builder. > > Initially as per the pysnmp documentation i used the build-pysnmp- > mib utility for converting the mibs to pysnmp mib format.But i get > the following error from pysnmp.smi import builder > > Empty input smidump -f python hpicfvg.mib | libsmi2pysnmp fails > > Also with using the -k option smidump generates a file but the > mibBuilder is not able to load the generated file. > > I read somewhere that there are bugs in the implementation but > cannot find enough documentation or examples on the internet > > Thanks > > Karan > > --- > --- > --- > --------------------------------------------------------------------- > vRanger cuts backup time in half-while increasing security. > With the market-leading solution for virtual backup and recovery, > you get blazing-fast, flexible, and affordable data protection. > Download your free trial now. > http://p.sf.net/sfu/quest-d2dcopy1 > _______________________________________________ > Pysnmp-dev mailing list > Pys...@li... > https://lists.sourceforge.net/lists/listinfo/pysnmp-dev |
From: Karan T. <kar...@gm...> - 2011-05-27 18:02:32
|
hi I am new person to pysnmp. I am trying to load some custom mibs using mib builder. Initially as per the pysnmp documentation i used the build-pysnmp-mib utility for converting the mibs to pysnmp mib format.But i get the following error from pysnmp.smi import builder Empty input smidump -f python hpicfvg.mib | libsmi2pysnmp fails Also with using the -k option smidump generates a file but the mibBuilder is not able to load the generated file. I read somewhere that there are bugs in the implementation but cannot find enough documentation or examples on the internet Thanks Karan |
From: Ilya E. <il...@gl...> - 2010-11-12 17:40:00
|
BTW, pysnmp code that is currently in CVS will not crash SNMP engine in case of a misconfiguration like you seem to have. -ilya > pysnmp/v4/proto/secmod/rfc3414/auth/base.py", line .., in > authenticateIncomingMsg > ProtocolError: no authentication |
From: Ilya E. <il...@gl...> - 2010-11-12 16:41:22
|
Mohammed, Your Manager might be querying using authentication option (e.g. authNoPriv or authPriv) while your Agent does not have a user configured with authentication option enabled. So, doublecheck that. BTW, in your example there seems to be a typo in username - 'test-uset' instead of 'test-user'. -ilya > Just one help needed regarding SNMPv3 set for agent. I > used the example given in the link: > > http://pysnmp.sourceforge.net/examples/4.x/v3arch/agent/cmdrsp.html > > Though v1, v2 are working fine as I have tested with (Free PowerSNMP > Manager) by discovering and sending queries. But when I tried doing so > with SNMPv3 set up by configuring noAuthNoPriv (no authentication, no > privacy), Manager is failing to discover the agent and agent throwing > error while discovery message is being processed on agent. The error is > > Traceback (most recent call last): > > /pysnmp/v4/carrier/asynsock/dispatch.py", line 60, in runDispatcher > > : : : > > : : : > > pysnmp/v4/carrier/asynsock/dgram/base.py", line .., in handle_read > > pysnmp/v4/carrier/base.py", line .., in _cbFun > > pysnmp/v4/entity/engine.py", line .., in __receiveMessageCbFun > > pysnmp/v4/proto/rfc3412.py", line ..., in receiveMessage > > pysnmp/v4/proto/mpmod/rfc3412.py", line ..., in prepareDataElements > > pysnmp/v4/proto/secmod/rfc3414/service.py", line ..., in > processIncomingMsg > > pysnmp/v4/proto/secmod/rfc3414/auth/base.py", line .., in > authenticateIncomingMsg > > ProtocolError: no authentication > > > > I modified the example only for ip address, used no authentication and > no privacy for v3 as shown here: > > config.addV3User( > > snmpEngine, 'test-uset', > > config.usmNoAuthProtocol, None, > > config.usmNoPrivProtocol, None > > ) > > : > > config.addRwUser(snmpEngine, 3, 'test-user', 'noAuthNoPriv', (1,3,6)) # > v3 > > And for discovery, I have used the following configuration on SNMP > Manager (powerSNMP Manager): > SNMP Version: Three > Security-level : None (other options: auth, authpriv) > Username: test-user > > Please have a look and suggest me where I am missing, or let me know if > my setup/configurations are not OK. |
From: Mohammed A. (mdaahad) <md...@ci...> - 2010-11-11 15:09:31
|
Hi Ilya, Just one help needed regarding SNMPv3 set for agent. I used the example given in the link: http://pysnmp.sourceforge.net/examples/4.x/v3arch/agent/cmdrsp.html Though v1, v2 are working fine as I have tested with (Free PowerSNMP Manager) by discovering and sending queries. But when I tried doing so with SNMPv3 set up by configuring noAuthNoPriv (no authentication, no privacy), Manager is failing to discover the agent and agent throwing error while discovery message is being processed on agent. The error is Traceback (most recent call last): /pysnmp/v4/carrier/asynsock/dispatch.py", line 60, in runDispatcher : : : : : : pysnmp/v4/carrier/asynsock/dgram/base.py", line .., in handle_read pysnmp/v4/carrier/base.py", line .., in _cbFun pysnmp/v4/entity/engine.py", line .., in __receiveMessageCbFun pysnmp/v4/proto/rfc3412.py", line ..., in receiveMessage pysnmp/v4/proto/mpmod/rfc3412.py", line ..., in prepareDataElements pysnmp/v4/proto/secmod/rfc3414/service.py", line ..., in processIncomingMsg pysnmp/v4/proto/secmod/rfc3414/auth/base.py", line .., in authenticateIncomingMsg ProtocolError: no authentication I modified the example only for ip address, used no authentication and no privacy for v3 as shown here: config.addV3User( snmpEngine, 'test-uset', config.usmNoAuthProtocol, None, config.usmNoPrivProtocol, None ) : config.addRwUser(snmpEngine, 3, 'test-user', 'noAuthNoPriv', (1,3,6)) # v3 And for discovery, I have used the following configuration on SNMP Manager (powerSNMP Manager): SNMP Version: Three Security-level : None (other options: auth, authpriv) Username: test-user Please have a look and suggest me where I am missing, or let me know if my setup/configurations are not OK. Thanks, Mohammed |
From: Ilya E. <il...@gl...> - 2010-11-06 15:49:14
|
Mohammed, You seem to run into a bug/typo. Patch is attached to this message and it's also in CVS at SF. You can modify and use pysnmp in any way. However it surprises me that you have to use pysnmp at relatively low API level. Maybe your goal could be satisfied on top of high-level API (which is more stable and easy to use). Therefore, once you consider sharing the details of your project, I could possibly advise on the best approach. -ilya > I am getting error when I use certain functions in > engine.py file like registerTransportDispatcher for the module 'error' > which is imported from pysnmp/error.py which has only one attribute > PySnmpError, the we are trying to call ProtocolError which is there in > pysnmp/proto/error.py. I believe we can change the code as per the > license agreement but I want to know if I am missing something or some > patch. Can you please clarify in this ? |
From: Ilya E. <il...@gl...> - 2010-11-06 15:19:44
|
Mohammed, > With reference to your example given in the following link: > http://pysnmp.sourceforge.net/examples/4.x/v3arch/agent/cmdrsp.html > > I want to know two facts, once you start your engine, which API in that > example is kind of a blocking call or the API which just listens for > GET/other requests from other devices ? and will get invoked only when > there is request (GET/SET) received ? In current implementation, everything revolves around the main loop which is invoked by: snmpEngine.transportDispatcher.runDispatcher() call and terminates only on SNMP engine shutdown. All other API functions/methods are either explicitly invoked before starting the main loop (mostly configuration settings) or called back from the mail loop on message arrival (MIB objects, in my example). Listening and processing incoming messages is hidden behind the API we are talking about here. > Once we have our own mapping with the real life objects and we have > fetched the real value after getting GET request, Which API of cmd > responder is preparing to send the response? (I can see the registration > but I don't see any mechanism there which prepares the response and send > it to the ip/device which has sent the request). With pysnmp's built-in SMI subsystem, you can intercept individual MIB object access using this code: # Override readGet method and return file content class MyFileReadingMibObject(MibScalarInstance): def readGet(self, name, *args): return name, rfc1902.OctetString(open('/etc/passwd').read()) # attach new object to MIB tree (you must also export its parent object) mibBuilder.exportSymbols( "__MYFILEREADING-MIB", MyFileReadingMibObject( (1, 3, 6, 1, 2, 1, 1, 2, 1), (0,), rfc1902.OctetString() ) ) Now when you do: snmpget -v2c -c public localhost 1.3.6.1.2.1.1.2.1.0 the return would be your /etc/passwd file content. Message preparing and sending is done automatically my SNMP engine -- you only have to return a value from your object's readGet() method. Keep in mind, that the readGet() method is currently synchronous -- you can't block in there or the whole SNMP engine would block. If fetching a value is going to take time, an asynchronous implementation is also possible. -ilya > -----Original Message----- > From: Ilya Etingof [mailto:il...@gl...] > Sent: Monday, November 01, 2010 9:56 PM > To: Mohammed Ahad (mdaahad) > Cc: Pys...@li... > Subject: RE: [Pysnmp-dev] Need information on SNMP Agent implementation > usingPYSNMP > > >> 1. once we start our engine, how can we listen (continuously) to the >> GET/SET requests received from other devices(may be a manager) ? > > Yes, sure you can. Here's a working example of an Agent: > > http://pysnmp.sourceforge.net/examples/4.x/v3arch/agent/cmdrsp.html > >> 2. I could not understand the mapping of the instances to real life >> objects, can you explain it briefly. > > What is your real-life setup? Knowing this would help me advise you the > best possible solution. > > Conceptually, pysnmp Agent talks to a SMI (MIB) subsystem through a very > > simple API (pysnmp.smi.MibInstrumController methods) to either fetch or > modify/create OID-value pairs. > > You can implement your own MIB backend and plug it into stock pysnmp > Agent. By way of example, this approach is used in the SNMP Simulator > software: > > http://sourceforge.net/projects/snmpsim/ > > Or you could use stock pysnmp SMI subsystem by > > 1) subclassing MibScalarInstance class and overloading its > read*/write* methods > > or > > 2) subclassing SNMP data type classes (Integer, OctetString, IpAddress > etc.), overloading their clone() method and attaching these > customized > objects to MibScalarInstance.syntax attribute. > > Here's a more in-depth discussion on the topic: > > http://sourceforge.net/mailarchive/forum.php?thread_name=4C00CD1E.609060 > 0%40akimeka.com&forum_name=pysnmp-users > >> 3. My implementation is about to add a support for SNMP agent where I >> have few MIBS. I want to add the SNMP agent support first then SNMP >> Manager support using PYSNMP. I have MIBs which are in xxx-MIB.py > form. > > With pysnmp you could implement Manager, Agent or Manager+Agent > kinds of applications. All scenarious support MIB backend (Agent > role) and MIB resolution (Manager role). > > If you have more specific questions, please, let me know. > > -ilya > >> -----Original Message----- >> From: Ilya Etingof [mailto:il...@gl...] >> Sent: Friday, October 29, 2010 2:56 AM >> To: Mohammed Ahad (mdaahad) >> Cc: Pys...@li... >> Subject: Re: [Pysnmp-dev] Need information on SNMP Agent > implementation >> usingPYSNMP >> >> >> There is a brief tutorial on Agent-side MIB support: >> >> http://pysnmp.sourceforge.net/docs/4.x/index.html#MIB-SERVICES >> >> All the low-level SNMP operations (like loading MIB backend, decoding >> SNMP >> queries etc) are hidden inside the CommandResponder application: >> >> http://pysnmp.sourceforge.net/examples/4.x/v3arch/agent/cmdrsp.html >> >> which is already a fully functional SNMP Agent. >> >> What might take most of your efforts is bridging your Managed >> Objects (this is what you are going to manage though SNMP) with >> pysnmp's MIB API. >> >> One approach is explained in the Agent application above, which >> is hooking on MibScalarInstance's "syntax" component. Though, there >> are a few others. >> >> If you explain your goal in more details, I'd be able to advise. >> >> -ilya >> >>> Moreover I need info on the requirements and infrastructure component >>> details that are essential to respond to SNMP Query, for example, how >>> can we start SNMP engine and how the MIB file (XXX-MIB.py) exports > the >>> symbols and how can it decode the SNMP Get Query and how can we > listen >>> to the queries. >>> >>> I need some good documentation on SNMP agent side >>> implementation using PYSNMP, or if someone guide me with a good >> example >>> (along with explanation) will be appreciable. >> >> > > |
From: Mohammed A. (mdaahad) <md...@ci...> - 2010-11-06 14:12:45
|
Hi Ilya, I am getting error when I use certain functions in engine.py file like registerTransportDispatcher for the module 'error' which is imported from pysnmp/error.py which has only one attribute PySnmpError, the we are trying to call ProtocolError which is there in pysnmp/proto/error.py. I believe we can change the code as per the license agreement but I want to know if I am missing something or some patch. Can you please clarify in this ? Thanks, Mohammed A Ahad |
From: Mohammed A. (mdaahad) <md...@ci...> - 2010-11-02 12:43:08
|
Hi Ilya, With reference to your example given in the following link: http://pysnmp.sourceforge.net/examples/4.x/v3arch/agent/cmdrsp.html I want to know two facts, once you start your engine, which API in that example is kind of a blocking call or the API which just listens for GET/other requests from other devices ? and will get invoked only when there is request (GET/SET) received ? Once we have our own mapping with the real life objects and we have fetched the real value after getting GET request, Which API of cmd responder is preparing to send the response? (I can see the registration but I don't see any mechanism there which prepares the response and send it to the ip/device which has sent the request). Thanks for your patience, M A Ahad -----Original Message----- From: Ilya Etingof [mailto:il...@gl...] Sent: Monday, November 01, 2010 9:56 PM To: Mohammed Ahad (mdaahad) Cc: Pys...@li... Subject: RE: [Pysnmp-dev] Need information on SNMP Agent implementation usingPYSNMP > 1. once we start our engine, how can we listen (continuously) to the > GET/SET requests received from other devices(may be a manager) ? Yes, sure you can. Here's a working example of an Agent: http://pysnmp.sourceforge.net/examples/4.x/v3arch/agent/cmdrsp.html > 2. I could not understand the mapping of the instances to real life > objects, can you explain it briefly. What is your real-life setup? Knowing this would help me advise you the best possible solution. Conceptually, pysnmp Agent talks to a SMI (MIB) subsystem through a very simple API (pysnmp.smi.MibInstrumController methods) to either fetch or modify/create OID-value pairs. You can implement your own MIB backend and plug it into stock pysnmp Agent. By way of example, this approach is used in the SNMP Simulator software: http://sourceforge.net/projects/snmpsim/ Or you could use stock pysnmp SMI subsystem by 1) subclassing MibScalarInstance class and overloading its read*/write* methods or 2) subclassing SNMP data type classes (Integer, OctetString, IpAddress etc.), overloading their clone() method and attaching these customized objects to MibScalarInstance.syntax attribute. Here's a more in-depth discussion on the topic: http://sourceforge.net/mailarchive/forum.php?thread_name=4C00CD1E.609060 0%40akimeka.com&forum_name=pysnmp-users > 3. My implementation is about to add a support for SNMP agent where I > have few MIBS. I want to add the SNMP agent support first then SNMP > Manager support using PYSNMP. I have MIBs which are in xxx-MIB.py form. With pysnmp you could implement Manager, Agent or Manager+Agent kinds of applications. All scenarious support MIB backend (Agent role) and MIB resolution (Manager role). If you have more specific questions, please, let me know. -ilya > -----Original Message----- > From: Ilya Etingof [mailto:il...@gl...] > Sent: Friday, October 29, 2010 2:56 AM > To: Mohammed Ahad (mdaahad) > Cc: Pys...@li... > Subject: Re: [Pysnmp-dev] Need information on SNMP Agent implementation > usingPYSNMP > > > There is a brief tutorial on Agent-side MIB support: > > http://pysnmp.sourceforge.net/docs/4.x/index.html#MIB-SERVICES > > All the low-level SNMP operations (like loading MIB backend, decoding > SNMP > queries etc) are hidden inside the CommandResponder application: > > http://pysnmp.sourceforge.net/examples/4.x/v3arch/agent/cmdrsp.html > > which is already a fully functional SNMP Agent. > > What might take most of your efforts is bridging your Managed > Objects (this is what you are going to manage though SNMP) with > pysnmp's MIB API. > > One approach is explained in the Agent application above, which > is hooking on MibScalarInstance's "syntax" component. Though, there > are a few others. > > If you explain your goal in more details, I'd be able to advise. > > -ilya > >> Moreover I need info on the requirements and infrastructure component >> details that are essential to respond to SNMP Query, for example, how >> can we start SNMP engine and how the MIB file (XXX-MIB.py) exports the >> symbols and how can it decode the SNMP Get Query and how can we listen >> to the queries. >> >> I need some good documentation on SNMP agent side >> implementation using PYSNMP, or if someone guide me with a good > example >> (along with explanation) will be appreciable. > > |
From: Ilya E. <il...@gl...> - 2010-11-01 16:26:35
|
> 1. once we start our engine, how can we listen (continuously) to the > GET/SET requests received from other devices(may be a manager) ? Yes, sure you can. Here's a working example of an Agent: http://pysnmp.sourceforge.net/examples/4.x/v3arch/agent/cmdrsp.html > 2. I could not understand the mapping of the instances to real life > objects, can you explain it briefly. What is your real-life setup? Knowing this would help me advise you the best possible solution. Conceptually, pysnmp Agent talks to a SMI (MIB) subsystem through a very simple API (pysnmp.smi.MibInstrumController methods) to either fetch or modify/create OID-value pairs. You can implement your own MIB backend and plug it into stock pysnmp Agent. By way of example, this approach is used in the SNMP Simulator software: http://sourceforge.net/projects/snmpsim/ Or you could use stock pysnmp SMI subsystem by 1) subclassing MibScalarInstance class and overloading its read*/write* methods or 2) subclassing SNMP data type classes (Integer, OctetString, IpAddress etc.), overloading their clone() method and attaching these customized objects to MibScalarInstance.syntax attribute. Here's a more in-depth discussion on the topic: http://sourceforge.net/mailarchive/forum.php?thread_name=4C00CD1E.6090600%40akimeka.com&forum_name=pysnmp-users > 3. My implementation is about to add a support for SNMP agent where I > have few MIBS. I want to add the SNMP agent support first then SNMP > Manager support using PYSNMP. I have MIBs which are in xxx-MIB.py form. With pysnmp you could implement Manager, Agent or Manager+Agent kinds of applications. All scenarious support MIB backend (Agent role) and MIB resolution (Manager role). If you have more specific questions, please, let me know. -ilya > -----Original Message----- > From: Ilya Etingof [mailto:il...@gl...] > Sent: Friday, October 29, 2010 2:56 AM > To: Mohammed Ahad (mdaahad) > Cc: Pys...@li... > Subject: Re: [Pysnmp-dev] Need information on SNMP Agent implementation > usingPYSNMP > > > There is a brief tutorial on Agent-side MIB support: > > http://pysnmp.sourceforge.net/docs/4.x/index.html#MIB-SERVICES > > All the low-level SNMP operations (like loading MIB backend, decoding > SNMP > queries etc) are hidden inside the CommandResponder application: > > http://pysnmp.sourceforge.net/examples/4.x/v3arch/agent/cmdrsp.html > > which is already a fully functional SNMP Agent. > > What might take most of your efforts is bridging your Managed > Objects (this is what you are going to manage though SNMP) with > pysnmp's MIB API. > > One approach is explained in the Agent application above, which > is hooking on MibScalarInstance's "syntax" component. Though, there > are a few others. > > If you explain your goal in more details, I'd be able to advise. > > -ilya > >> Moreover I need info on the requirements and infrastructure component >> details that are essential to respond to SNMP Query, for example, how >> can we start SNMP engine and how the MIB file (XXX-MIB.py) exports the >> symbols and how can it decode the SNMP Get Query and how can we listen >> to the queries. >> >> I need some good documentation on SNMP agent side >> implementation using PYSNMP, or if someone guide me with a good > example >> (along with explanation) will be appreciable. > > |
From: Mohammed A. (mdaahad) <md...@ci...> - 2010-10-29 17:56:09
|
Hi Ilya, Thank you very much for the quick response. I have been through those useful documents, but still I have few doubts: 1. once we start our engine, how can we listen (continuously) to the GET/SET requests received from other devices(may be a manager) ? 2. I could not understand the mapping of the instances to real life objects, can you explain it briefly. 3. My implementation is about to add a support for SNMP agent where I have few MIBS. I want to add the SNMP agent support first then SNMP Manager support using PYSNMP. I have MIBs which are in xxx-MIB.py form. Once again thanks for the quick response and waiting for the specific response to my queries. Thanks, M A Ahad -----Original Message----- From: Ilya Etingof [mailto:il...@gl...] Sent: Friday, October 29, 2010 2:56 AM To: Mohammed Ahad (mdaahad) Cc: Pys...@li... Subject: Re: [Pysnmp-dev] Need information on SNMP Agent implementation usingPYSNMP There is a brief tutorial on Agent-side MIB support: http://pysnmp.sourceforge.net/docs/4.x/index.html#MIB-SERVICES All the low-level SNMP operations (like loading MIB backend, decoding SNMP queries etc) are hidden inside the CommandResponder application: http://pysnmp.sourceforge.net/examples/4.x/v3arch/agent/cmdrsp.html which is already a fully functional SNMP Agent. What might take most of your efforts is bridging your Managed Objects (this is what you are going to manage though SNMP) with pysnmp's MIB API. One approach is explained in the Agent application above, which is hooking on MibScalarInstance's "syntax" component. Though, there are a few others. If you explain your goal in more details, I'd be able to advise. -ilya > Moreover I need info on the requirements and infrastructure component > details that are essential to respond to SNMP Query, for example, how > can we start SNMP engine and how the MIB file (XXX-MIB.py) exports the > symbols and how can it decode the SNMP Get Query and how can we listen > to the queries. > > I need some good documentation on SNMP agent side > implementation using PYSNMP, or if someone guide me with a good example > (along with explanation) will be appreciable. |
From: Ilya E. <il...@gl...> - 2010-10-28 21:25:50
|
There is a brief tutorial on Agent-side MIB support: http://pysnmp.sourceforge.net/docs/4.x/index.html#MIB-SERVICES All the low-level SNMP operations (like loading MIB backend, decoding SNMP queries etc) are hidden inside the CommandResponder application: http://pysnmp.sourceforge.net/examples/4.x/v3arch/agent/cmdrsp.html which is already a fully functional SNMP Agent. What might take most of your efforts is bridging your Managed Objects (this is what you are going to manage though SNMP) with pysnmp's MIB API. One approach is explained in the Agent application above, which is hooking on MibScalarInstance's "syntax" component. Though, there are a few others. If you explain your goal in more details, I'd be able to advise. -ilya > Moreover I need info on the requirements and infrastructure component > details that are essential to respond to SNMP Query, for example, how > can we start SNMP engine and how the MIB file (XXX-MIB.py) exports the > symbols and how can it decode the SNMP Get Query and how can we listen > to the queries. > > I need some good documentation on SNMP agent side > implementation using PYSNMP, or if someone guide me with a good example > (along with explanation) will be appreciable. |
From: Mohammed A. (mdaahad) <md...@ci...> - 2010-10-28 15:32:29
|
Moreover I need info on the requirements and infrastructure component details that are essential to respond to SNMP Query, for example, how can we start SNMP engine and how the MIB file (XXX-MIB.py) exports the symbols and how can it decode the SNMP Get Query and how can we listen to the queries. Thanks in advance, M A Ahad From: Mohammed Ahad (mdaahad) Sent: Thursday, October 28, 2010 8:54 PM To: Pys...@li... Subject: [Pysnmp-dev] Need information on SNMP Agent implementation usingPYSNMP Hi All, I need some good documentation on SNMP agent side implementation using PYSNMP, or if someone guide me with a good example (along with explanation) will be appreciable. Thanks, M A Ahad |
From: Mohammed A. (mdaahad) <md...@ci...> - 2010-10-28 15:24:18
|
Hi All, I need some good documentation on SNMP agent side implementation using PYSNMP, or if someone guide me with a good example (along with explanation) will be appreciable. Thanks, M A Ahad |
From: Ilya E. <il...@gl...> - 2010-07-21 14:36:53
|
You seem to be correct. That's a bug in pysnmp code. I have just fixed it in CVS at SF. But how did you notice it? Did it break something to SNMP message decoding? thanks, ilya > I believe that definition of this class should be: > > class Opaque(univ.OctetString): > tagSet = univ.OctetString.tagSet.tagImplicitly( > tag.Tag(tag.tagClassApplication, tag.tagFormatSimple, 0x04) > ) > > Am I correct? |
From: Fero K. <fer...@gm...> - 2010-07-21 08:23:23
|
Hi, I am new to PySNMP, I am trying to use it in my application. I am unsure, whether definition of following class in pysnmp/proto/rfc1155.py is correct: class Opaque(univ.OctetString): tagSet = univ.Integer.tagSet.tagImplicitly( tag.Tag(tag.tagClassApplication, tag.tagFormatSimple, 0x04) ) Definition of Opaque in RFC 1155 is: 3.2.3.6. Opaque This application-wide type supports the capability to pass arbitrary ASN.1 syntax. A value is encoded using the ASN.1 basic rules into a string of octets. This, in turn, is encoded as an OCTET STRING, in effect "double-wrapping" the original ASN.1 value. I believe that definition of this class should be: class Opaque(univ.OctetString): tagSet = univ.OctetString.tagSet.tagImplicitly( tag.Tag(tag.tagClassApplication, tag.tagFormatSimple, 0x04) ) Am I correct? ** Fero |
From: Ilya E. <il...@gl...> - 2010-03-20 08:09:43
|
There are no issues with v2c protocol support. I'd suggest you starting with SNMPv3 architecture, which is easier to use and supports v1, v2c and v3 protocol versions. See comments in this script for protocol version selection: http://pysnmp.sourceforge.net/examples/4.x/v3arch/oneliner/manager/getgen.html -ilya > I am new to SNMP and pysnmp. I find on the project home page there is only > examples for v1 and v3. No V2 examples, but if I type 2.x in the address > bar, I can find these example for v2c. > > Since I will begin test a V2 agent using pysnmp examples, I wonder if there > is any issues with v2c? |
From: frank z. <fra...@gm...> - 2010-03-19 19:25:28
|
Hi, I am new to SNMP and pysnmp. I find on the project home page there is only examples for v1 and v3. No V2 examples, but if I type 2.x in the address bar, I can find these example for v2c. Since I will begin test a V2 agent using pysnmp examples, I wonder if there is any issues with v2c? |
From: Ilya E. <il...@gl...> - 2010-01-20 17:00:36
|
Since pysnmp 4.1.12a there is no v4 directory in the package. I suspect an error somewhere in your pysnmp distribution. Please, report this issue to your pysnmp distribution supplier. Meanwhile, I suggest using pysnmp (and pyasn1) source distributions from SourceForge. In any case, the right way to import pysnmp modules, regardless of pysnmp version, is like: from pysnmp.entity.rfc3413.oneliner import cmdgen, ntforg -ilya > there seems to be a problem in the pysnmp package coming with karmic > koala. The ..../pymodules/pysnmp/ has to sub directorys v3 and v4. The > Problem ist that the import module path of the scripts doesnt include > this v4. So the import fails anytime. > > If i try to import pysnmp.v4.* then it fails with sub scripts > > >>> import pysnmp; print pysnmp.__file__ > /usr/lib/pymodules/python2.6/pysnmp/__init__.pyc > >>> quit() > > from pysnmp.entity.rfc3413.oneliner import cmdgen, ntforg > > leads to > > Traceback (most recent call last): > File "check_apc.py", line 6, in <module> > from pysnmp.entity.rfc3413.oneliner import cmdgen, ntforg > ImportError: No module named entity.rfc3413.oneliner |
From: Joerg S. <joe...@df...> - 2010-01-19 10:22:57
|
Hi all, there seems to be a problem in the pysnmp package coming with karmic koala. The ..../pymodules/pysnmp/ has to sub directorys v3 and v4. The Problem ist that the import module path of the scripts doesnt include this v4. So the import fails anytime. If i try to import pysnmp.v4.* then it fails with sub scripts >>> import pysnmp; print pysnmp.__file__ /usr/lib/pymodules/python2.6/pysnmp/__init__.pyc >>> quit() from pysnmp.entity.rfc3413.oneliner import cmdgen, ntforg leads to Traceback (most recent call last): File "check_apc.py", line 6, in <module> from pysnmp.entity.rfc3413.oneliner import cmdgen, ntforg ImportError: No module named entity.rfc3413.oneliner Best Wishes |
From: <Chi...@L-...> - 2009-11-03 00:24:11
|
I try to use commercial MIB browsers like winAgent and MG-SOFT to query pysnmp agent. It doesn't work. But when I use pysnmp getgen oneliner in examples. It works. I try to debug in site-packages\pysnmp\v4\entity\rfc3413\cmdrsp.py. I try to print securityName and securityLevel at processPdu (line 79 in the cmdrsp.py). If I use pysnmp getgen, it print out the securityName and securityLevel, However when I use Commercial Browser, it never gets there, which means processPdu is never called. Anything wrong? Thanks Chi |
From: Ilya E. <il...@gl...> - 2009-10-24 08:06:42
|
Bonjour, C'est un bogue qui a été déjà corrigé dans CVS. Svp, trouvez la version correcte attachée à ce message. -ilya > File "/usr/lib/python2.5/site-packages/pysnmp/v4/smi/builder.py", line 85, in loadModules > 'MIB module \"%s\" load error: %s' % (modPath, why) > pysnmp.smi.error.SmiError: MIB module "/usr/lib/python2.5/site-packages/pysnmp/v4/smi/mibs/RFC1155-SMI.py" load error: name 'Unsigned32' is not defined > > L'erreur est déjà là à l'installation des sources, j'ai regardé dans l'archive et le fichier RFC1155-SMI.py contient déjà des types Unsigned32 qui ne sont pas importés. Dans les anciennes versions, c'est bien des Integer32. > > Extrait de RFC1155-SMI.py: > # Imports > > ( Integer, ObjectIdentifier, OctetString, ) = mibBuilder.importSymbols("ASN1", "Integer", "ObjectIdentifier", "OctetString") > ( Bits, Integer32, MibIdentifier, TimeTicks, ) = mibBuilder.importSymbols("SNMPv2-SMI", "Bits", "Integer32", "MibIdentifier", "TimeTicks") > > # Types > > class Counter(Unsigned32): > subtypeSpec = Unsigned32.subtypeSpec+constraint.ValueRangeConstraint(0,4294967295L) > pass > > class Gauge(Unsigned32): > subtypeSpec = Unsigned32.subtypeSpec+constraint.ValueRangeConstraint(0,4294967295L) > pass > > [.....] > > class TimeTicks(Unsigned32): > subtypeSpec = Unsigned32.subtypeSpec+constraint.ValueRangeConstraint(0,4294967295L) > pass > > On voit bien que le type Unsigned32 n'est pas importé. > > Je n'ai pas de problème avec ma MIB, c'est juste que la fonction > loadModules charge toutes les MIB du dossier dont celle qui est bugguée. > > Cordialement, > > Marion DELEY |
From: Ilya E. <il...@gl...> - 2009-10-23 13:24:30
|
Bonjour, Pourriez-vous svp fournir la trace de pile ou le code d'exemple pour me laisser voir ce qui se produit? Vous pourriez convertir MIB.txt en .py avec le & de smidump outils de pysnmp/outils/libsmi2pysnmp. -ilya > J'utilise actuellement pysnmp pour un manager SNMP en python et lorsque > j'utilise la fonction loadModules() du fichier builder.py, je récupère > une erreur sur les types de données déclarées dans cette version de la > RFC -> Unsigned32 au lieu de Integer32. En comparaison avec vos > anciennes versions, il se trouve qu'il y a une erreur dans les sources > de la v4.1.11a, le type Unsigned doit être remplacé par le type Integer. > Je ne sais pas comment vous convertissez vos MIB .txt en .py mais le > problème vient sûrement du générateur. |
From: <Mar...@fr...> - 2009-10-23 13:10:50
|
Bonjour, J'utilise actuellement pysnmp pour un manager SNMP en python et lorsque j'utilise la fonction loadModules() du fichier builder.py, je récupère une erreur sur les types de données déclarées dans cette version de la RFC -> Unsigned32 au lieu de Integer32. En comparaison avec vos anciennes versions, il se trouve qu'il y a une erreur dans les sources de la v4.1.11a, le type Unsigned doit être remplacé par le type Integer. Je ne sais pas comment vous convertissez vos MIB .txt en .py mais le problème vient sûrement du générateur. Cordialement, DELEY Marion |
From: Martin J. <mh...@sw...> - 2009-09-07 17:13:18
|
Ilya Etingof wrote: > > It turned to be a bug triggered by changed MIB text file. This bug has > been fixed in CVS (and also accedentally released at PyPi). The fix went > to libsmi2pysnmp script, rebuilt MIB is attached to this message. OK, thanks. I'll attach the patch to the FreeBSD port as well. Marty |