pysnmp-users Mailing List for SNMP library for Python (Page 4)
Brought to you by:
elie
You can subscribe to this list here.
2002 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(2) |
Jul
|
Aug
(2) |
Sep
(3) |
Oct
(2) |
Nov
(4) |
Dec
(4) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2003 |
Jan
|
Feb
(3) |
Mar
(16) |
Apr
(3) |
May
(6) |
Jun
|
Jul
(7) |
Aug
(12) |
Sep
(4) |
Oct
(2) |
Nov
(11) |
Dec
(6) |
2004 |
Jan
(1) |
Feb
(41) |
Mar
(4) |
Apr
(1) |
May
(6) |
Jun
|
Jul
(8) |
Aug
(5) |
Sep
(8) |
Oct
(10) |
Nov
(3) |
Dec
(1) |
2005 |
Jan
|
Feb
(4) |
Mar
(8) |
Apr
(4) |
May
(10) |
Jun
(5) |
Jul
(10) |
Aug
(6) |
Sep
(6) |
Oct
(39) |
Nov
(20) |
Dec
(21) |
2006 |
Jan
(14) |
Feb
(6) |
Mar
(15) |
Apr
|
May
(5) |
Jun
(16) |
Jul
(16) |
Aug
(18) |
Sep
(35) |
Oct
(12) |
Nov
(3) |
Dec
(3) |
2007 |
Jan
(12) |
Feb
(19) |
Mar
(27) |
Apr
(14) |
May
(32) |
Jun
|
Jul
(35) |
Aug
(11) |
Sep
(11) |
Oct
(6) |
Nov
(13) |
Dec
(4) |
2008 |
Jan
(7) |
Feb
(4) |
Mar
(2) |
Apr
(3) |
May
(3) |
Jun
(5) |
Jul
(5) |
Aug
(1) |
Sep
(2) |
Oct
(3) |
Nov
(19) |
Dec
(7) |
2009 |
Jan
(2) |
Feb
(2) |
Mar
(12) |
Apr
(16) |
May
(16) |
Jun
(23) |
Jul
(7) |
Aug
(2) |
Sep
(17) |
Oct
(20) |
Nov
(20) |
Dec
(5) |
2010 |
Jan
(11) |
Feb
(17) |
Mar
(20) |
Apr
(7) |
May
(6) |
Jun
(14) |
Jul
(5) |
Aug
(10) |
Sep
(23) |
Oct
(16) |
Nov
(32) |
Dec
(21) |
2011 |
Jan
(6) |
Feb
(11) |
Mar
(3) |
Apr
(1) |
May
(4) |
Jun
(1) |
Jul
(4) |
Aug
(8) |
Sep
(20) |
Oct
(9) |
Nov
(29) |
Dec
(25) |
2012 |
Jan
(2) |
Feb
(5) |
Mar
(2) |
Apr
(22) |
May
(21) |
Jun
(7) |
Jul
(6) |
Aug
(2) |
Sep
(12) |
Oct
(20) |
Nov
(17) |
Dec
(17) |
2013 |
Jan
(4) |
Feb
(4) |
Mar
(8) |
Apr
(8) |
May
(10) |
Jun
(2) |
Jul
(23) |
Aug
(12) |
Sep
(14) |
Oct
(12) |
Nov
(4) |
Dec
(18) |
2014 |
Jan
(2) |
Feb
(7) |
Mar
(3) |
Apr
(8) |
May
(7) |
Jun
(1) |
Jul
(5) |
Aug
(2) |
Sep
(8) |
Oct
|
Nov
(2) |
Dec
(1) |
2015 |
Jan
(3) |
Feb
(15) |
Mar
(14) |
Apr
(4) |
May
(6) |
Jun
(3) |
Jul
(1) |
Aug
(6) |
Sep
(5) |
Oct
(21) |
Nov
(43) |
Dec
(10) |
2016 |
Jan
|
Feb
(2) |
Mar
(6) |
Apr
(4) |
May
(6) |
Jun
(2) |
Jul
(6) |
Aug
(5) |
Sep
(4) |
Oct
|
Nov
(3) |
Dec
(11) |
2017 |
Jan
(1) |
Feb
(8) |
Mar
|
Apr
(7) |
May
|
Jun
|
Jul
(5) |
Aug
|
Sep
(9) |
Oct
(8) |
Nov
|
Dec
|
2018 |
Jan
|
Feb
|
Mar
(2) |
Apr
(2) |
May
(1) |
Jun
(2) |
Jul
(2) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2019 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(1) |
Nov
|
Dec
|
2020 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(1) |
Dec
|
From: Ilya E. <il...@gl...> - 2016-07-03 08:01:37
|
I’d make sure that your agent is listening on the IP interface you are querying and that there is not firewall blocking SNMP packets. > On 01 Jul 2016, at 15:46, Fabio Ferreira <fab...@gm...> wrote: > > Hi. > I am new in pysnmp ... and I have working mib command responder ... if I execute snmpwalk from the host (localhost) it works ok. > The problem is that if execute the command from another host (in the same LAN segment) it produces a timeout. > > Checking by wireshark (when execeuted from remote host) I see that request arrives to the agent, but response is something like ICMP. > > Does someone knsows why? > |
From: R. D. M. <rdm...@bi...> - 2016-07-01 14:47:33
|
On Fri, 01 Jul 2016 13:46:23 -0000, Fabio Ferreira <fab...@gm...> wrote: > Hi. > I am new in pysnmp ... and I have working mib command responder ... if I > execute snmpwalk from the host (localhost) it works ok. > The problem is that if execute the command from another host (in the same > LAN segment) it produces a timeout. > > Checking by wireshark (when execeuted from remote host) I see that request > arrives to the agent, but response is something like ICMP. > > Does someone knsows why? Firewall issue, perhaps? --David |
From: Fabio F. <fab...@gm...> - 2016-07-01 13:46:40
|
Hi. I am new in pysnmp ... and I have working mib command responder ... if I execute snmpwalk from the host (localhost) it works ok. The problem is that if execute the command from another host (in the same LAN segment) it produces a timeout. Checking by wireshark (when execeuted from remote host) I see that request arrives to the agent, but response is something like ICMP. Does someone knsows why? |
From: vasu1894 <vas...@gm...> - 2016-06-15 18:50:24
|
MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="--_com.samsung.android.email_4117545868288870" ----_com.samsung.android.email_4117545868288870 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: base64 CgoKClNlbnQgdmlhIHRoZSBTYW1zdW5nIEdhbGF4eSBTwq4gNiBlZGdlLCBhbiBBVCZUIDRHIExU RSBzbWFydHBob25lCgoKCgpIaSBBbGwsCsKgCkkgYW0gdXNpbmcgcHlzbXAgNC4zLjIgd2l0aCB2 MyBzdXBwb3J0IHRvIHBvbGwgQnJvY2FkZSBzd2l0Y2ggZGV0YWlscy4KVXNpbmcgdjMgdmVyc2lv biBJIGNhbiBhYmxlIHRvIGNvbW11bmljYXRlIHdpdGggdGhlIE1hbmFnZW1lbnQgSVAgKEFjdGl2 ZSBJUCkgQWRkcmVzcyBzdWNjZXNzZnVsbHksIGJ1dCB3aGVuIEkgdHJ5IHRvIHBvbGwgQ2hhc3Np cyBJUCBhZGRyZXNzIEkgYW0gZ2V0dGluZyB1bmtub3duRW5naW5lSWQgZXJyb3IuCsKgCldoZXJl IGFzIHNubXBnZXQgSSBjYW4gYWJsZSB0byBnZXQgc3VjY2Vzc2Z1bCByZXNwb25zZSBmcm9tIGJv dGggdGhlIElQIEFkZHJlc3Nlcy4KwqAKSSBuZWVkIHF1aWNrIGhlbHAvc3VnZ2VzdGlvbiB0aGF0 IGhvdyB0byBnZXQgdGhlIHJlc3BvbnNlIGZyb20gQ2hhc3NpcyBJUC4KCsKgCkkgYW0gdXNpbmcg djMgdXNlciBhbmQgIm5vQXV0aE5vUHJpdiIKVGhhbmtzICYgUmVnYXJkcyxWYXN1CsKgCgo= ----_com.samsung.android.email_4117545868288870 Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: base64 PGh0bWw+PGhlYWQ+PG1ldGEgaHR0cC1lcXVpdj0iQ29udGVudC1UeXBlIiBjb250ZW50PSJ0ZXh0 L2h0bWw7IGNoYXJzZXQ9VVRGLTgiPjwvaGVhZD48Ym9keT48ZGl2Pjxicj48L2Rpdj48ZGl2Pjxi cj48L2Rpdj48ZGl2Pjxicj48L2Rpdj48ZGl2Pjxicj48L2Rpdj48ZGl2IGlkPSJjb21wb3Nlcl9z aWduYXR1cmUiPjxkaXYgc3R5bGU9ImZvbnQtc2l6ZTo4NSU7Y29sb3I6IzU3NTc1NyIgZGlyPSJh dXRvIj5TZW50IHZpYSB0aGUgU2Ftc3VuZyBHYWxheHkgU8KuIDYgZWRnZSwgYW4gQVQmYW1wO1Qg NEcgTFRFIHNtYXJ0cGhvbmU8L2Rpdj48L2Rpdj48ZGl2Pjxicj48L2Rpdj48ZGl2IHN0eWxlPSJm b250LXNpemU6MTAwJTtjb2xvcjojMDAwMDAwIj48IS0tIG9yaWdpbmFsTWVzc2FnZSAtLT48ZGl2 Pjxicj48L2Rpdj48ZGl2Pjxicj48L2Rpdj48L2Rpdj4KPGRpdiBjbGFzcz0iV29yZFNlY3Rpb24x Ij4KPHAgY2xhc3M9Ik1zb05vcm1hbCI+SGkgQWxsLDxvOnA+PC9vOnA+PC9wPgo8cCBjbGFzcz0i TXNvTm9ybWFsIj48bzpwPiZuYnNwOzwvbzpwPjwvcD4KPHAgY2xhc3M9Ik1zb05vcm1hbCI+SSBh bSB1c2luZyBweXNtcCA0LjMuMiB3aXRoIHYzIHN1cHBvcnQgdG8gcG9sbCBCcm9jYWRlIHN3aXRj aCBkZXRhaWxzLjxvOnA+PC9vOnA+PC9wPgo8cCBjbGFzcz0iTXNvTm9ybWFsIj5Vc2luZyB2MyB2 ZXJzaW9uIEkgY2FuIGFibGUgdG8gY29tbXVuaWNhdGUgd2l0aCB0aGUgTWFuYWdlbWVudCBJUCAo QWN0aXZlIElQKSBBZGRyZXNzIHN1Y2Nlc3NmdWxseSwgYnV0IHdoZW4gSSB0cnkgdG8gcG9sbCBD aGFzc2lzIElQIGFkZHJlc3MgSSBhbSBnZXR0aW5nIHVua25vd25FbmdpbmVJZCBlcnJvci48bzpw PjwvbzpwPjwvcD4KPHAgY2xhc3M9Ik1zb05vcm1hbCI+PG86cD4mbmJzcDs8L286cD48L3A+Cjxw IGNsYXNzPSJNc29Ob3JtYWwiPldoZXJlIGFzIHNubXBnZXQgSSBjYW4gYWJsZSB0byBnZXQgc3Vj Y2Vzc2Z1bCByZXNwb25zZSBmcm9tIGJvdGggdGhlIElQIEFkZHJlc3Nlcy48bzpwPjwvbzpwPjwv cD4KPHAgY2xhc3M9Ik1zb05vcm1hbCI+PG86cD4mbmJzcDs8L286cD48L3A+CjxwIGNsYXNzPSJN c29Ob3JtYWwiPkkgbmVlZCBxdWljayBoZWxwL3N1Z2dlc3Rpb24gdGhhdCBob3cgdG8gZ2V0IHRo ZSByZXNwb25zZSBmcm9tIENoYXNzaXMgSVAuCjxvOnA+PC9vOnA+PC9wPgo8cCBjbGFzcz0iTXNv Tm9ybWFsIj48bzpwPiZuYnNwOzwvbzpwPjwvcD4KPHAgY2xhc3M9Ik1zb05vcm1hbCI+SSBhbSB1 c2luZyB2MyB1c2VyIGFuZCAibm9BdXRoTm9Qcml2IjwvcD48cCBjbGFzcz0iTXNvTm9ybWFsIj48 c3BhbiBzdHlsZT0iZm9udC1zaXplOiAxMnB0OyI+PGJyPjwvc3Bhbj48L3A+PHAgY2xhc3M9Ik1z b05vcm1hbCI+PHNwYW4gc3R5bGU9ImZvbnQtc2l6ZTogMTJwdDsiPlRoYW5rcyAmYW1wOyBSZWdh cmRzLDwvc3Bhbj48L3A+PHAgY2xhc3M9Ik1zb05vcm1hbCI+PHNwYW4gc3R5bGU9ImZvbnQtc2l6 ZToxMi4wcHQiPlZhc3U8L3NwYW4+PC9wPgo8cCBjbGFzcz0iTXNvTm9ybWFsIj48bzpwPiZuYnNw OzwvbzpwPjwvcD4KPC9kaXY+CjwvYm9keT48L2h0bWw+ ----_com.samsung.android.email_4117545868288870-- |
From: Johan G. <joh...@gm...> - 2016-06-02 22:32:08
|
Hi Ilya, Sorry I didn't get your previous reply. I use pysnmp 4.2.5 for my stuff. It would be great if you can let me know how I can get the SNMP version. In my script, I do the following to create v1/2 and v3 users: # user: usr-sha-aes128, auth: SHA, priv AES config.addV3User( self.snmpEngine, SNMPV3_USER, config.usmHMACSHAAuthProtocol, SNMPV3_AUTH, config.usmAesCfb128Protocol, SNMPV3_PRIV ) # SNMPv1/2c setup # SecurityName <-> CommunityName mapping config.addV1System(self.snmpEngine, SEC_NAME, COMMUNITY_V2) Thanks J On Thu, May 19, 2016 at 4:49 PM, Johan Geldenhuys <joh...@gm...> wrote: > Hi all, > > I used the examples and can get SNMPv2 and SNMPv3 traps in the same > receiver. > I would like to print the SNMP version from the trap, but don't know how > to get it. > > pysnmp.proto.api.verdec does this, but it needs the whole message and I > don't know how to send it the whole message. > > Thank you, > J > |
From: Alexander L. <gu...@gm...> - 2016-05-31 16:22:55
|
Greetings. Im sorry, am I getting something wrong or lookupNames/lookupValues variables make no difference? > >>> from pysnmp.entity.rfc3413.oneliner import cmdgen > >>> cmdGen = cmdgen.CommandGenerator() > >>> errorIndication, errorStatus, errorIndex, varBinds = cmdGen.getCmd( > ... cmdgen.CommunityData('community'), > ... cmdgen.UdpTransportTarget(('127.0.0.1', 161)), > ... '1.3.6.1.2.1.1.1.0', > ... lookupNames=False, lookupValues=False > ... ) > >>> name, value = varBinds[0] > >>> name.prettyPrint() > 'SNMPv2-MIB::sysDescr.0' It also returns resolved names by default. |
From: Ilya E. <il...@gl...> - 2016-05-19 06:59:39
|
In general, SNMP version is carried inside SNMP message envelope. You could also distinguish v1 from v2c&v3 by TRAP PDU type. With high-level pysnmp API message and PDU details are hidden but SNMP version still could be determined from configuration entry being in use. What pysnmp API you use? > On 19 May 2016, at 08:49, Johan Geldenhuys <joh...@gm...> wrote: > > Hi all, > > I used the examples and can get SNMPv2 and SNMPv3 traps in the same receiver. > I would like to print the SNMP version from the trap, but don't know how to get it. > > pysnmp.proto.api.verdec does this, but it needs the whole message and I don't know how to send it the whole message. > > Thank you, > J |
From: Johan G. <joh...@gm...> - 2016-05-19 06:49:49
|
Hi all, I used the examples and can get SNMPv2 and SNMPv3 traps in the same receiver. I would like to print the SNMP version from the trap, but don't know how to get it. pysnmp.proto.api.verdec does this, but it needs the whole message and I don't know how to send it the whole message. Thank you, J |
From: Ilya E. <il...@gl...> - 2016-05-06 22:59:51
|
Hi Markus, That is a bug indeed! Please try pysnmp from git master where it is hopefully fixed: https://github.com/etingof/pysnmp <https://github.com/etingof/pysnmp> > On 03 May 2016, at 14:34, Markus Bienst <mb...@ma...> wrote: > > Hello, > i found out that running a pysnmp script as root with a self assigned SnmpEngineId leads to a resource leak (missing close) of temporary files generated by pysnmp. > > The attached testscript demonstrates the Problem. > > if i start the script with 'sudo ./pysnmp_fd.py' and investigate the list of open files with 'sudo lsof -p <pidofscript>' i get this for example: > > ... > python3 26101 root 5u IPv4 973309 0t0 UDP *:39370 > python3 26101 root 6u REG 8,33 0 4068419 /tmp/__pysnmp/0x8000000001020304/tmpl5h37q3f > python3 26101 root 7u REG 8,33 0 4068420 /tmp/__pysnmp/0x8000000001020304/tmpcenfh0fm > python3 26101 root 8u REG 8,33 0 4068423 /tmp/__pysnmp/0x8000000001020304/tmpwojwxt30 > python3 26101 root 9u REG 8,33 0 4068421 /tmp/__pysnmp/0x8000000001020304/tmpkfs4hu1f > python3 26101 root 10u REG 8,33 0 4068426 /tmp/__pysnmp/0x8000000001020304/tmptxdjiven > python3 26101 root 11u REG 8,33 0 4068422 /tmp/__pysnmp/0x8000000001020304/tmpnch_emnz > python3 26101 root 12u REG 8,33 0 4068424 /tmp/__pysnmp/0x8000000001020304/tmpf0lxqusd > python3 26101 root 13u IPv4 973311 0t0 UDP *:36011 > python3 26101 root 14u REG 8,33 0 4068425 /tmp/__pysnmp/0x8000000001020304/tmphtq5h3bb > python3 26101 root 15u REG 8,33 0 4068427 /tmp/__pysnmp/0x8000000001020304/tmpt1d5xmmy > python3 26101 root 16u IPv4 973320 0t0 UDP *:36018 > ... > > The List of files will grow until the max number of filedescriptors is reached (throwing an exception). > If I remove the self assigned EngineId from SNMPEngine()'s Ctor no temporary files are created. > > Am I doing something wrong?? > > > System: Ubuntu 14.04 x86_64 > pysnmp: Version: 4.3.2 > python: Python 3.4.3 > > > Best Regards > > Markus Bienst > |
From: Markus B. <mb...@ma...> - 2016-05-04 10:11:48
|
Hello, i found out that running a pysnmp script as root with a self assigned SnmpEngineId leads to a resource leak (missing close) of temporary files generated by pysnmp. The attached testscript demonstrates the Problem. if i start the script with 'sudo ./pysnmp_fd.py' and investigate the list of open files with 'sudo lsof -p <pidofscript>' i get this for example: ... python3 26101 root 5u IPv4 973309 0t0 UDP *:39370 python3 26101 root 6u REG 8,33 0 4068419 /tmp/__pysnmp/0x8000000001020304/tmpl5h37q3f python3 26101 root 7u REG 8,33 0 4068420 /tmp/__pysnmp/0x8000000001020304/tmpcenfh0fm python3 26101 root 8u REG 8,33 0 4068423 /tmp/__pysnmp/0x8000000001020304/tmpwojwxt30 python3 26101 root 9u REG 8,33 0 4068421 /tmp/__pysnmp/0x8000000001020304/tmpkfs4hu1f python3 26101 root 10u REG 8,33 0 4068426 /tmp/__pysnmp/0x8000000001020304/tmptxdjiven python3 26101 root 11u REG 8,33 0 4068422 /tmp/__pysnmp/0x8000000001020304/tmpnch_emnz python3 26101 root 12u REG 8,33 0 4068424 /tmp/__pysnmp/0x8000000001020304/tmpf0lxqusd python3 26101 root 13u IPv4 973311 0t0 UDP *:36011 python3 26101 root 14u REG 8,33 0 4068425 /tmp/__pysnmp/0x8000000001020304/tmphtq5h3bb python3 26101 root 15u REG 8,33 0 4068427 /tmp/__pysnmp/0x8000000001020304/tmpt1d5xmmy python3 26101 root 16u IPv4 973320 0t0 UDP *:36018 ... The List of files will grow until the max number of filedescriptors is reached (throwing an exception). If I remove the self assigned EngineId from SNMPEngine()'s Ctor no temporary files are created. Am I doing something wrong?? System: Ubuntu 14.04 x86_64 pysnmp: Version: 4.3.2 python: Python 3.4.3 Best Regards Markus Bienst |
From: Markus B. <mb...@ma...> - 2016-05-03 12:35:16
|
Hello, i found out that running a pysnmp script as root with a self assigned SnmpEngineId leads to a resource leak (missing close) of temporary files generated by pysnmp. The attached testscript demonstrates the Problem. if i start the script with 'sudo ./pysnmp_fd.py' and investigate the list of open files with 'sudo lsof -p <pidofscript>' i get this for example: ... python3 26101 root 5u IPv4 973309 0t0 UDP *:39370 python3 26101 root 6u REG 8,33 0 4068419 /tmp/__pysnmp/0x8000000001020304/tmpl5h37q3f python3 26101 root 7u REG 8,33 0 4068420 /tmp/__pysnmp/0x8000000001020304/tmpcenfh0fm python3 26101 root 8u REG 8,33 0 4068423 /tmp/__pysnmp/0x8000000001020304/tmpwojwxt30 python3 26101 root 9u REG 8,33 0 4068421 /tmp/__pysnmp/0x8000000001020304/tmpkfs4hu1f python3 26101 root 10u REG 8,33 0 4068426 /tmp/__pysnmp/0x8000000001020304/tmptxdjiven python3 26101 root 11u REG 8,33 0 4068422 /tmp/__pysnmp/0x8000000001020304/tmpnch_emnz python3 26101 root 12u REG 8,33 0 4068424 /tmp/__pysnmp/0x8000000001020304/tmpf0lxqusd python3 26101 root 13u IPv4 973311 0t0 UDP *:36011 python3 26101 root 14u REG 8,33 0 4068425 /tmp/__pysnmp/0x8000000001020304/tmphtq5h3bb python3 26101 root 15u REG 8,33 0 4068427 /tmp/__pysnmp/0x8000000001020304/tmpt1d5xmmy python3 26101 root 16u IPv4 973320 0t0 UDP *:36018 ... The List of files will grow until the max number of filedescriptors is reached (throwing an exception). If I remove the self assigned EngineId from SNMPEngine()'s Ctor no temporary files are created. Am I doing something wrong?? System: Ubuntu 14.04 x86_64 pysnmp: Version: 4.3.2 python: Python 3.4.3 Best Regards Markus Bienst |
From: Ilya E. <il...@gl...> - 2016-04-22 20:22:10
|
Fixed, thanks for the heads up! Let me know if you come across other outdated MIBs. > the prebuild POWER-ETHERNET-MIB.py generated from http://mibs.snmplabs.com:80/asn1/POWER-ETHERNET-MIB > is outdated and not working. The OID mapping is incorrect. The last Revision RFC3621 is from December 2003. |
From: Markus B. <mb...@ma...> - 2016-04-22 12:09:02
|
Hello, the prebuild POWER-ETHERNET-MIB.py generated from http://mibs.snmplabs.com:80/asn1/POWER-ETHERNET-MIB is outdated and not working. The OID mapping is incorrect. The last Revision RFC3621 is from December 2003. Kind regards Markus Bienst |
From: Ilya E. <il...@gl...> - 2016-04-17 18:28:36
|
Make sure you have pysmi package installed and packed together with your tool. Also, MIB modules need to be explicitly included into the .exe: http://pysnmp.sourceforge.net/faq/py2exe-throws-error.html > On 17 Apr 2016, at 12:59, Воропаев Павел <vor...@gm...> wrote: > > Hello, > > Trying to build executable for simple pysnmp script and getting following error. > Same error with cx_Freeze. > > C:\Users\Pavel.Voropaev\PycharmProjects\snmp_poller\dist>poller.exe > Traceback (most recent call last): > File "poller.py", line 19, in <module> > File "pysnmp\entity\rfc3413\oneliner\cmdgen.pyc", line 181, in getCmd > File "pysnmp\hlapi\asyncore\sync\cmdgen.pyc", line 107, in getCmd > File "pysnmp\hlapi\asyncore\cmdgen.pyc", line 127, in getCmd > File "pysnmp\hlapi\varbinds.pyc", line 36, in makeVarBinds > File "pysnmp\smi\rfc1902.pyc", line 838, in resolveWithMib > File "pysnmp\smi\rfc1902.pyc", line 356, in resolveWithMib > File "pysnmp\smi\compiler.pyc", line 48, in addMibCompiler > File "pysmi\parser\smi.pyc", line 27, in __init__ > File "pysmi\lexer\smi.pyc", line 89, in __init__ > File "pysmi\lexer\smi.pyc", line 106, in reset > File "ply\lex.pyc", line 906, in lex > File "ply\lex.pyc", line 580, in validate_all > File "ply\lex.pyc", line 822, in validate_rules > File "ply\lex.pyc", line 833, in validate_module > File "inspect.pyc", line 690, in getsourcelines > File "inspect.pyc", line 538, in findsource > IOError: could not get source code > > Python 2.7.11 x86 > Windows 10 > > Anybody had this problem? |
From: Воропаев П. <vor...@gm...> - 2016-04-17 10:59:33
|
import ConfigParser, logging from pysnmp.entity.rfc3413.oneliner import cmdgen config = ConfigParser.RawConfigParser() config.readfp(open('snmp_poller.cfg')) ip = config.get('main', 'IP') port = config.get('main', 'port') community = config.get('main', 'community') oid = config.get('main', 'OID') logfile = config.get('main', 'logfile') logging.basicConfig(filename=logfile, level=logging.INFO) cmdGen = cmdgen.CommandGenerator() errorIndication, errorStatus, errorIndex, varBinds = cmdGen.getCmd( cmdgen.CommunityData(community), cmdgen.UdpTransportTarget((ip, port)), oid ) if errorIndication: logging.info(errorIndication) elif errorStatus: logging.info('%s at %s' % (errorStatus.prettyPrint(), errorIndex and varBinds[int(errorIndex) - 1][0] or '?')) else: for varBind in varBinds: logging.info(ip + ':' + oid + ':' +':'.join([x.prettyPrint() for x in varBind])) |
From: Ilya E. <il...@gl...> - 2016-03-13 09:56:35
|
This is a quick notice that all pysnmp project repositories have been moved to Github: https://github.com/etingof/pysnmp <https://github.com/etingof/pysnmp> https://github.com/etingof/pysnmp-apps <https://github.com/etingof/pysnmp-apps> https://github.com/etingof/pysnmp-mibs <https://github.com/etingof/pysnmp-mibs> as we’ll as some packages pysnmp depends on: https://github.com/etingof/pyasn1 https://github.com/etingof/pysmi <https://github.com/etingof/pysmi> Your contributions and pull requests are very welcome! |
From: Johan G. <joh...@gm...> - 2016-03-09 21:42:55
|
Hi Ilya, Yes, I need to remotely configure SNMPv3 / USM user via SNMP. Thank you for the RFC reference and will look at that today. Is there anything in pysnmp that makers this a little easier? Can you please tell me if this OID makes any sense? 1: snmpTargetAddrTAddress.116.104.111.115.116.45.57.56.51.50.48.57.51.54.57 (TAddress) 0A.00.00.E7.00.A2 (hex) I would expect a simple index number after snmpTargetAddrTAddress, but this weird string comes back, which is the target IP address and port number. Cheers Johan On Mon, Mar 7, 2016 at 3:21 AM, Ilya Etingof <il...@gl...> wrote: > > Hi Johan, > > What is your ultimate goal? Do you need to remotely configure SNMPv3 / USM > user via SNMP? > This procedure is described in a SNMP RFC and could be done via a sequence > of SNMP commands. > And it is somewhat complex (see RFC3414-3415). > > Local USM configuration is done in a similar way, but it is greatly > simplified by addV3User() wrapper > function in pysnmp. In other words, if you want to have a script that acts > as SNMPv3 Agent, > just use those pysnmp wrapper functions: > > > http://pysnmp.sourceforge.net/examples/v3arch/asyncore/agent/cmdrsp/snmp-versions.html#multiple-snmp-usm-users > > On 03 Mar 2016, at 00:22, Johan Geldenhuys <joh...@gm...> wrote: > > Hi, > I did a little more digging and am trying to set a new snmpTarget via > MG-Soft before i figure out how to use pysnmp and it doesn't work as > expected. > It looks like you have to set the status of snmpTargetAddrRowStatus to > 4(createAndGo) or 5(createAndWait) for the new row. Then set the table > entries forsnmpTargetAddrEntry . You also have to set a new row with > parameters in *snmpTargetParamsEntry*.This part was successful, but when > I go back to the first table and try to set to 1(active) it gives me an > Inconsistent value error. > > is there anybody with experience in doing this and how would using pysnmp > make this easier? > > Cheers > > On Tue, Mar 1, 2016 at 3:48 PM, Johan Geldenhuys <joh...@gm...> > wrote: > >> Hi, >> I'm using pysnmp v4.2.5 and would like to know if there is an example of >> setting/creating a new:- >> 1) SNMPv3 trap target on a agent? >> The MIB that I found that contains this information is snmpTargetMIB >> (1.3.6.1.6.3.12) >> 2) SNMPv3 user . The MIB I found that contains this is usmUserTable >> (1.3.6.1.6.3.15.1.2.2). >> >> In both cases the users will be using auth and priv. >> >> I found some addV3User stuff in pysnmp.entity.config, but don't know it >> is relevant. >> >> Any help would be greatly appreciated. I don't even know where to begin. >> >> Regards, >> kma_jg >> > > -------------------------- > > |
From: Ilya E. <il...@gl...> - 2016-03-06 23:47:45
|
That was a change in pysnmp 4.3 caused by the introduction of NotificationType object. Now all MIB objects implicitly required for a given notification (through NOTIFICATION-TYPE macro) will be added blank to TRAP PDU. I believe you should be able to pass actual variables either through ‘objects’ dict or by passing them to .addVarBinds(): NotificationType( ObjectIdentity('DISMAN-EVENT-MIB', 'mteTriggerFired'), instanceIndex=(0,), objects={('DISMAN-EVENT-MIB', 'mteHotTrigger'): 'trigger', ('DISMAN-EVENT-MIB', 'mteHotTargetName'): 'target', ('DISMAN-EVENT-MIB', 'mteHotContextName'): 'context', ('DISMAN-EVENT-MIB', 'mteHotOID'): '1.3.6.1.1.1', ('DISMAN-EVENT-MIB', 'mteHotValue'): 1234} ) or NotificationType( ObjectIdentity('DISMAN-EVENT-MIB', 'mteTriggerFired'), instanceIndex=(0,) ).addVarBinds( ObjectType(ObjectIdentity('DISMAN-EVENT-MIB', 'mteHotContextName', 0), 'test’), ... ) Please, try the latest pysnmp from github: https://github.com/etingof/pysnmp Also make sure to use NotificationType for initializing TRAPs rather than MibVariable objects. > On 17 Feb 2016, at 02:27, evi...@em... wrote: > > Basically, the code that was working in 4.2.5 broke in 4.3.0. If I look at > it in wireshark, in 4.3.2 I have 2 repeated elements, with Null as the > value. I'm not sure if I'm using pysnmp correctly or if a bug got > introduced. > > Rest of message is Python code and MIB file for a minimal reproduction. > > ----- > > from pysnmp.smi import builder > from pysnmp.entity import engine > from pysnmp.entity.rfc3413.oneliner import ntforg > import os.path > class SNMPSender(object): > """Will send a SNMP trap to a specific ip address, based on an event's > data""" > def __init__(self, ip, port=162): > self.ip = ip > self.port = int(port) > snmp_engine = engine.SnmpEngine() > mib_builder = > snmp_engine.msgAndPduDsp.mibInstrumController.mibBuilder > mib_builder.setMibSources(builder.DirMibSource(os.path.join(os.path.dirname(__file__), > "pysnmp_mibs")), > *mib_builder.getMibSources()) > self.ntf_org = ntforg.NotificationOriginator(snmp_engine) > def send_event(self, event_name, event_category): > self.ntf_org.sendNotification( > ntforg.CommunityData('public'), # Login data; might need to > be replaced. > ntforg.UdpTransportTarget((self.ip, self.port)), # actual > connection info > 'trap', # type of data we're sending > ntforg.MibVariable('EVENTS-MIB', 'eventNotice'), # actual > data we're sending > (ntforg.MibVariable('EVENTS-MIB', 'eventName'), event_name), > (ntforg.MibVariable('EVENTS-MIB', 'eventCategory'), > event_category) > ) > SNMPSender("4.3.2.1").send_event("event_name", "event_category") > > ----- > > EVENTS-MIB DEFINITIONS ::= BEGIN > -- If you edit this file, you also need to regenerate the .py file > associated with this: > -- Use the page at https://www.ibr.cs.tu-bs.de/bin/smitools.cgi to convert > to Python format (smidump, target format Python). Save the result to a > file. > -- On a Linux-like system (cygwin will work), run "cat result_file | > python libsmi2pysnmp", sending the result to a file. libsmi2pysnmp is > located in Python27/Scripts if pysnmp is installed. > > IMPORTS > MODULE-IDENTITY, NOTIFICATION-TYPE, > OBJECT-TYPE, enterprises > FROM SNMPv2-SMI > MODULE-COMPLIANCE, NOTIFICATION-GROUP, OBJECT-GROUP > FROM SNMPv2-CONF; > > -- Most of this is just for human consumption. If you edit this, I suggest > editing LAST-UPDATED and adding a new REVISION/DESCRIPTION set. > eventMIB MODULE-IDENTITY > LAST-UPDATED "201507010000Z" > ORGANIZATION "---" > CONTACT-INFO > "---" > DESCRIPTION > "MIB file. Currently just holds event information for > generation of SNMP traps." > REVISION "201507010000Z" > DESCRIPTION > "Initial revision" > ::= { enterprises 37033 } > > -- information for notifications > > eventTraps OBJECT IDENTIFIER ::= { eventMIB 0 } > eventObjects OBJECT IDENTIFIER ::= { eventMIB 1 } > > -- These are basically from the event object. > eventName OBJECT-TYPE > SYNTAX OCTET STRING -- max length 65536 > MAX-ACCESS read-only > STATUS current > DESCRIPTION > "A string indicating the type of notification. Corresponds with event > name." > ::= { eventObjects 1 } > > eventCategory OBJECT-TYPE > SYNTAX OCTET STRING > MAX-ACCESS read-only > STATUS current > DESCRIPTION > "The name of the module/app sending the notification. Corresponds with > event category." > ::= { eventObjects 2 } > > -- This is the actual trap. There is no special significance to 2. > eventNotice NOTIFICATION-TYPE > OBJECTS { eventName, eventCategory } > STATUS current > DESCRIPTION > "An event trap." > ::= { eventTraps 2 } > > > -- Conformance information. It's needed, but you don't need to understand > it too much. Just add new objects to one of the 2 groups. > eventMIBCompliances > OBJECT IDENTIFIER ::= { eventMIB 3 } > eventMIBGroups OBJECT IDENTIFIER ::= { eventMIB 4 } > > eventComplianceGroups MODULE-COMPLIANCE > STATUS current > DESCRIPTION > "The compliance statement for this MIB module." > MODULE -- this module > MANDATORY-GROUPS { trapGroup, objectGroup } > > ::= { eventMIBCompliances 1 } > > -- If you add extra traps, they need to go in here. > trapGroup NOTIFICATION-GROUP > NOTIFICATIONS { eventNotice } > STATUS current > DESCRIPTION > "Basic event notifications." > ::= { eventMIBGroups 1 } > > > -- If you add extra objects, they need to go in here. > objectGroup OBJECT-GROUP > OBJECTS {eventName, eventCategory} > STATUS current > DESCRIPTION > "Grouped event parameters." > ::= { eventMIBGroups 2 } > > END > |
From: Ilya E. <il...@gl...> - 2016-03-06 16:37:01
|
Hi Johan, What is your ultimate goal? Do you need to remotely configure SNMPv3 / USM user via SNMP? This procedure is described in a SNMP RFC and could be done via a sequence of SNMP commands. And it is somewhat complex (see RFC3414-3415). Local USM configuration is done in a similar way, but it is greatly simplified by addV3User() wrapper function in pysnmp. In other words, if you want to have a script that acts as SNMPv3 Agent, just use those pysnmp wrapper functions: http://pysnmp.sourceforge.net/examples/v3arch/asyncore/agent/cmdrsp/snmp-versions.html#multiple-snmp-usm-users <http://pysnmp.sourceforge.net/examples/v3arch/asyncore/agent/cmdrsp/snmp-versions.html#multiple-snmp-usm-users> > On 03 Mar 2016, at 00:22, Johan Geldenhuys <joh...@gm...> wrote: > > Hi, > I did a little more digging and am trying to set a new snmpTarget via MG-Soft before i figure out how to use pysnmp and it doesn't work as expected. > It looks like you have to set the status of snmpTargetAddrRowStatus to 4(createAndGo) or 5(createAndWait) for the new row. Then set the table entries forsnmpTargetAddrEntry . You also have to set a new row with parameters in snmpTargetParamsEntry.This part was successful, but when I go back to the first table and try to set to 1(active) it gives me an Inconsistent value error. > > is there anybody with experience in doing this and how would using pysnmp make this easier? > > Cheers > > On Tue, Mar 1, 2016 at 3:48 PM, Johan Geldenhuys <joh...@gm... <mailto:joh...@gm...>> wrote: > Hi, > I'm using pysnmp v4.2.5 and would like to know if there is an example of setting/creating a new:- > 1) SNMPv3 trap target on a agent? > The MIB that I found that contains this information is snmpTargetMIB (1.3.6.1.6.3.12) > 2) SNMPv3 user . The MIB I found that contains this is usmUserTable (1.3.6.1.6.3.15.1.2.2). > > In both cases the users will be using auth and priv. > > I found some addV3User stuff in pysnmp.entity.config, but don't know it is relevant. > > Any help would be greatly appreciated. I don't even know where to begin. > > Regards, > kma_jg > > -------------------------- |
From: Johan G. <joh...@gm...> - 2016-03-02 23:22:55
|
Hi, I did a little more digging and am trying to set a new snmpTarget via MG-Soft before i figure out how to use pysnmp and it doesn't work as expected. It looks like you have to set the status of snmpTargetAddrRowStatus to 4(createAndGo) or 5(createAndWait) for the new row. Then set the table entries forsnmpTargetAddrEntry . You also have to set a new row with parameters in *snmpTargetParamsEntry*.This part was successful, but when I go back to the first table and try to set to 1(active) it gives me an Inconsistent value error. is there anybody with experience in doing this and how would using pysnmp make this easier? Cheers On Tue, Mar 1, 2016 at 3:48 PM, Johan Geldenhuys <joh...@gm...> wrote: > Hi, > I'm using pysnmp v4.2.5 and would like to know if there is an example of > setting/creating a new:- > 1) SNMPv3 trap target on a agent? > The MIB that I found that contains this information is snmpTargetMIB > (1.3.6.1.6.3.12) > 2) SNMPv3 user . The MIB I found that contains this is usmUserTable > (1.3.6.1.6.3.15.1.2.2). > > In both cases the users will be using auth and priv. > > I found some addV3User stuff in pysnmp.entity.config, but don't know it is > relevant. > > Any help would be greatly appreciated. I don't even know where to begin. > > Regards, > kma_jg > |
From: Johan G. <joh...@gm...> - 2016-03-01 04:48:54
|
Hi, I'm using pysnmp v4.2.5 and would like to know if there is an example of setting/creating a new:- 1) SNMPv3 trap target on a agent? The MIB that I found that contains this information is snmpTargetMIB (1.3.6.1.6.3.12) 2) SNMPv3 user . The MIB I found that contains this is usmUserTable (1.3.6.1.6.3.15.1.2.2). In both cases the users will be using auth and priv. I found some addV3User stuff in pysnmp.entity.config, but don't know it is relevant. Any help would be greatly appreciated. I don't even know where to begin. Regards, kma_jg |
From: shufen z. <sfz...@ho...> - 2016-02-25 00:18:20
|
Hi Ilya and everyone, I am facing a problem in dynamic table handling for agent implementation. Table rows can be populated statically as what have been showed in example: http://pysnmp.sourceforge.net/faq/how-to-implement-agent-mib.html and rows can be retrieved by snmp manager. But I failed in update the table data dynamically. The table size will change over time too. At the end of the example it was noted that: "Keep in mind that the values of this table row will not change by themselves. They basically hold a snapshot of a data set so your application may have to update them somehow. For example, an app could periodically lookup particular MibScalarInstance by OID at mibBuilder and update its "syntax" attribute with a new value. There are other ways for building MIB tables that represent dynamic Managed Objects." Could you give more clue or to explain how to build MIB tables that represent dynamic Managed Objects? Greatly appreciated for any help, Shu ________________________________ From: Ilya Etingof <il...@gl...> Sent: Thursday, December 24, 2015 12:16 PM To: Gilmar Sinhorin Cc: pys...@li... Subject: Re: [pysnmp-users] Turn off the oid translation Hi Gilmar, Just pass: lookupMib=False keyword option to getCmd() or any other *Cmd() functions like explained in the documentation: http://pysnmp.sourceforge.net/docs/hlapi/asyncore/sync/manager/cmdgen/getcmd.html#pysnmp.hlapi.getCmd GET command - PySNMP<http://pysnmp.sourceforge.net/docs/hlapi/asyncore/sync/manager/cmdgen/getcmd.html#pysnmp.hlapi.getCmd> pysnmp.sourceforge.net Notes. The getCmd generator will be exhausted immidiately unless a new sequence of varBinds are send back into running generator (supported since Python 2.6). On 24 Dec 2015, at 20:37, Gilmar Sinhorin <gil...@er...<mailto:gil...@er...>> wrote: Hi All, I would like to check with you if there is a way to turn off the oid translation when invoke the getCmd method of CommandGenerator class. I passed the oid 1.3.6.1.4.1. 8595.x.x.x.x.x to as parameter of getCmd method and returns the oid modified like SNMPv2-SMI::enterprises.8595.x.x.x.x.x in the results. I wonder if there are attributes in the CommandGenerator object to be set in order to avoid modify the oid into the results or return like this 1.3.6.1.4.1. 8595.x.x.x.x.x. It started work like this after I upgrade the PySNMP from version 4.2.5 to 4.3.1-py2.7. Also I know the replace of '1.3.6.1.4.1.' by 'SNMPv2-SMI::enterprises' is correct in terms of representation, but It would make easy for me to compare the results at high level by using the numerical representation of the oid. Please let me know if you need further detail. Regards, Gilmar |
From: <evi...@em...> - 2016-02-17 02:43:47
|
Basically, the code that was working in 4.2.5 broke in 4.3.0. If I look at it in wireshark, in 4.3.2 I have 2 repeated elements, with Null as the value. I'm not sure if I'm using pysnmp correctly or if a bug got introduced. Rest of message is Python code and MIB file for a minimal reproduction. ----- from pysnmp.smi import builder from pysnmp.entity import engine from pysnmp.entity.rfc3413.oneliner import ntforg import os.path class SNMPSender(object): """Will send a SNMP trap to a specific ip address, based on an event's data""" def __init__(self, ip, port=162): self.ip = ip self.port = int(port) snmp_engine = engine.SnmpEngine() mib_builder = snmp_engine.msgAndPduDsp.mibInstrumController.mibBuilder mib_builder.setMibSources(builder.DirMibSource(os.path.join(os.path.dirname(__file__), "pysnmp_mibs")), *mib_builder.getMibSources()) self.ntf_org = ntforg.NotificationOriginator(snmp_engine) def send_event(self, event_name, event_category): self.ntf_org.sendNotification( ntforg.CommunityData('public'), # Login data; might need to be replaced. ntforg.UdpTransportTarget((self.ip, self.port)), # actual connection info 'trap', # type of data we're sending ntforg.MibVariable('EVENTS-MIB', 'eventNotice'), # actual data we're sending (ntforg.MibVariable('EVENTS-MIB', 'eventName'), event_name), (ntforg.MibVariable('EVENTS-MIB', 'eventCategory'), event_category) ) SNMPSender("4.3.2.1").send_event("event_name", "event_category") ----- EVENTS-MIB DEFINITIONS ::= BEGIN -- If you edit this file, you also need to regenerate the .py file associated with this: -- Use the page at https://www.ibr.cs.tu-bs.de/bin/smitools.cgi to convert to Python format (smidump, target format Python). Save the result to a file. -- On a Linux-like system (cygwin will work), run "cat result_file | python libsmi2pysnmp", sending the result to a file. libsmi2pysnmp is located in Python27/Scripts if pysnmp is installed. IMPORTS MODULE-IDENTITY, NOTIFICATION-TYPE, OBJECT-TYPE, enterprises FROM SNMPv2-SMI MODULE-COMPLIANCE, NOTIFICATION-GROUP, OBJECT-GROUP FROM SNMPv2-CONF; -- Most of this is just for human consumption. If you edit this, I suggest editing LAST-UPDATED and adding a new REVISION/DESCRIPTION set. eventMIB MODULE-IDENTITY LAST-UPDATED "201507010000Z" ORGANIZATION "---" CONTACT-INFO "---" DESCRIPTION "MIB file. Currently just holds event information for generation of SNMP traps." REVISION "201507010000Z" DESCRIPTION "Initial revision" ::= { enterprises 37033 } -- information for notifications eventTraps OBJECT IDENTIFIER ::= { eventMIB 0 } eventObjects OBJECT IDENTIFIER ::= { eventMIB 1 } -- These are basically from the event object. eventName OBJECT-TYPE SYNTAX OCTET STRING -- max length 65536 MAX-ACCESS read-only STATUS current DESCRIPTION "A string indicating the type of notification. Corresponds with event name." ::= { eventObjects 1 } eventCategory OBJECT-TYPE SYNTAX OCTET STRING MAX-ACCESS read-only STATUS current DESCRIPTION "The name of the module/app sending the notification. Corresponds with event category." ::= { eventObjects 2 } -- This is the actual trap. There is no special significance to 2. eventNotice NOTIFICATION-TYPE OBJECTS { eventName, eventCategory } STATUS current DESCRIPTION "An event trap." ::= { eventTraps 2 } -- Conformance information. It's needed, but you don't need to understand it too much. Just add new objects to one of the 2 groups. eventMIBCompliances OBJECT IDENTIFIER ::= { eventMIB 3 } eventMIBGroups OBJECT IDENTIFIER ::= { eventMIB 4 } eventComplianceGroups MODULE-COMPLIANCE STATUS current DESCRIPTION "The compliance statement for this MIB module." MODULE -- this module MANDATORY-GROUPS { trapGroup, objectGroup } ::= { eventMIBCompliances 1 } -- If you add extra traps, they need to go in here. trapGroup NOTIFICATION-GROUP NOTIFICATIONS { eventNotice } STATUS current DESCRIPTION "Basic event notifications." ::= { eventMIBGroups 1 } -- If you add extra objects, they need to go in here. objectGroup OBJECT-GROUP OBJECTS {eventName, eventCategory} STATUS current DESCRIPTION "Grouped event parameters." ::= { eventMIBGroups 2 } END |
From: Ilya E. <il...@gl...> - 2015-12-24 20:16:54
|
Hi Gilmar, Just pass: lookupMib=False keyword option to getCmd() or any other *Cmd() functions like explained in the documentation: http://pysnmp.sourceforge.net/docs/hlapi/asyncore/sync/manager/cmdgen/getcmd.html#pysnmp.hlapi.getCmd <http://pysnmp.sourceforge.net/docs/hlapi/asyncore/sync/manager/cmdgen/getcmd.html#pysnmp.hlapi.getCmd> > On 24 Dec 2015, at 20:37, Gilmar Sinhorin <gil...@er...> wrote: > > Hi All, > I would like to check with you if there is a way to turn off the oid translation when invoke the getCmd method of CommandGenerator class. > I passed the oid 1.3.6.1.4.1. 8595.x.x.x.x.x to as parameter of getCmd method and returns the oid modified like SNMPv2-SMI::enterprises.8595.x.x.x.x.x in the results. > I wonder if there are attributes in the CommandGenerator object to be set in order to avoid modify the oid into the results or return like this 1.3.6.1.4.1. 8595.x.x.x.x.x. > It started work like this after I upgrade the PySNMP from version 4.2.5 to 4.3.1-py2.7. > Also I know the replace of ‘1.3.6.1.4.1.’ by ‘SNMPv2-SMI::enterprises’ is correct in terms of representation, but It would make easy for me to compare the results at high level by using the numerical representation of the oid. > > Please let me know if you need further detail. > Regards, > Gilmar |
From: Gilmar S. <gil...@er...> - 2015-12-24 19:37:46
|
Hi All, I would like to check with you if there is a way to turn off the oid translation when invoke the getCmd method of CommandGenerator class. I passed the oid 1.3.6.1.4.1. 8595.x.x.x.x.x to as parameter of getCmd method and returns the oid modified like SNMPv2-SMI::enterprises.8595.x.x.x.x.x in the results. I wonder if there are attributes in the CommandGenerator object to be set in order to avoid modify the oid into the results or return like this 1.3.6.1.4.1. 8595.x.x.x.x.x. It started work like this after I upgrade the PySNMP from version 4.2.5 to 4.3.1-py2.7. Also I know the replace of '1.3.6.1.4.1.' by 'SNMPv2-SMI::enterprises' is correct in terms of representation, but It would make easy for me to compare the results at high level by using the numerical representation of the oid. Please let me know if you need further detail. Regards, Gilmar |