Skip Menu |

This queue is for tickets about the Net-SNMP CPAN distribution.


Subject: get_entries when previous index does not exist
I have an SNMP-enabled system with a table. The content of one column is given below. When I make a get_entries for index 10 or 856, it works. For 35, it does not. Made a tcpdump and I noticed that the query is an SNMP-GET-NEXT done on the index-1. As in this table the index 9 and 855 exists, it works. Index 34 does not exists, which, I think, leads to the non-retrieval of the values. Can provide you the script listing if you wish. snmpwalk -c public -v 2c ***** 1.3.6.1.4.1.2552.200.300.2.1.1.18 SNMPv2-SMI::enterprises.2552.200.300.2.1.1.18.6 = Gauge32: 3862 SNMPv2-SMI::enterprises.2552.200.300.2.1.1.18.9 = Gauge32: 472 SNMPv2-SMI::enterprises.2552.200.300.2.1.1.18.10 = Gauge32: 530 SNMPv2-SMI::enterprises.2552.200.300.2.1.1.18.11 = Gauge32: 4224 SNMPv2-SMI::enterprises.2552.200.300.2.1.1.18.15 = Gauge32: 3207 SNMPv2-SMI::enterprises.2552.200.300.2.1.1.18.17 = Gauge32: 1825 SNMPv2-SMI::enterprises.2552.200.300.2.1.1.18.19 = Gauge32: 750 SNMPv2-SMI::enterprises.2552.200.300.2.1.1.18.21 = Gauge32: 750 SNMPv2-SMI::enterprises.2552.200.300.2.1.1.18.22 = Gauge32: 750 SNMPv2-SMI::enterprises.2552.200.300.2.1.1.18.25 = Gauge32: 3838 SNMPv2-SMI::enterprises.2552.200.300.2.1.1.18.26 = Gauge32: 0 SNMPv2-SMI::enterprises.2552.200.300.2.1.1.18.27 = Gauge32: 3616 SNMPv2-SMI::enterprises.2552.200.300.2.1.1.18.32 = Gauge32: 750 SNMPv2-SMI::enterprises.2552.200.300.2.1.1.18.33 = Gauge32: 750 SNMPv2-SMI::enterprises.2552.200.300.2.1.1.18.35 = Gauge32: 3604 SNMPv2-SMI::enterprises.2552.200.300.2.1.1.18.36 = Gauge32: 750 SNMPv2-SMI::enterprises.2552.200.300.2.1.1.18.38 = Gauge32: 3916 SNMPv2-SMI::enterprises.2552.200.300.2.1.1.18.44 = Gauge32: 385 SNMPv2-SMI::enterprises.2552.200.300.2.1.1.18.45 = Gauge32: 1615 SNMPv2-SMI::enterprises.2552.200.300.2.1.1.18.46 = Gauge32: 750 SNMPv2-SMI::enterprises.2552.200.300.2.1.1.18.370 = Gauge32: 750 SNMPv2-SMI::enterprises.2552.200.300.2.1.1.18.371 = Gauge32: 750 SNMPv2-SMI::enterprises.2552.200.300.2.1.1.18.374 = Gauge32: 7274 SNMPv2-SMI::enterprises.2552.200.300.2.1.1.18.379 = Gauge32: 116 SNMPv2-SMI::enterprises.2552.200.300.2.1.1.18.504 = Gauge32: 1751 SNMPv2-SMI::enterprises.2552.200.300.2.1.1.18.506 = Gauge32: 4040 SNMPv2-SMI::enterprises.2552.200.300.2.1.1.18.558 = Gauge32: 0 SNMPv2-SMI::enterprises.2552.200.300.2.1.1.18.562 = Gauge32: 750 SNMPv2-SMI::enterprises.2552.200.300.2.1.1.18.710 = Gauge32: 750 SNMPv2-SMI::enterprises.2552.200.300.2.1.1.18.759 = Gauge32: 208 SNMPv2-SMI::enterprises.2552.200.300.2.1.1.18.760 = Gauge32: 550 SNMPv2-SMI::enterprises.2552.200.300.2.1.1.18.780 = Gauge32: 5185 SNMPv2-SMI::enterprises.2552.200.300.2.1.1.18.781 = Gauge32: 4992 SNMPv2-SMI::enterprises.2552.200.300.2.1.1.18.840 = Gauge32: 4439 SNMPv2-SMI::enterprises.2552.200.300.2.1.1.18.841 = Gauge32: 4540 SNMPv2-SMI::enterprises.2552.200.300.2.1.1.18.851 = Gauge32: 3168 SNMPv2-SMI::enterprises.2552.200.300.2.1.1.18.855 = Gauge32: 978 SNMPv2-SMI::enterprises.2552.200.300.2.1.1.18.856 = Gauge32: 1543 SNMPv2-SMI::enterprises.2552.200.300.2.1.1.18.881 = Gauge32: 1910 SNMPv2-SMI::enterprises.2552.200.300.2.1.1.18.958 = Gauge32: 2593 SNMPv2-SMI::enterprises.2552.200.300.2.1.1.18.959 = Gauge32: 2459 SNMPv2-SMI::enterprises.2552.200.300.2.1.1.18.1004 = Gauge32: 1591
A copy of the script or a least the relevant parts would be helpful. Also running with debug on (-debug => 0xff, in the session() constructor) and providing the output might provide some insight.
Subject: RE: [rt.cpan.org #42672] get_entries when previous index does not exist
Date: Fri, 23 Jan 2009 09:20:21 +0100
To: <bug-Net-SNMP [...] rt.cpan.org>
From: "DENIS Laurent" <Laurent.DENIS [...] mail.mobistar.be>
Oh, I forgot to mention that I have the same problem on a Solaris 10 with Net::SNMP 5.2.0 compiled from source and on a Debian with 5.2.0 installed from the distribution's repository. L. Show quoted text
-----Original Message----- From: David M. Town via RT [mailto:bug-Net-SNMP@rt.cpan.org] Sent: Thursday, January 22, 2009 4:12 PM To: DENIS Laurent Subject: [rt.cpan.org #42672] get_entries when previous index does not exist <URL: https://rt.cpan.org/Ticket/Display.html?id=42672 > A copy of the script or a least the relevant parts would be helpful. Also running with debug on (-debug => 0xff, in the session() constructor) and providing the output might provide some insight. *****DISCLAIMER***** This electronic transmission (and any attached document) is intended exclusively for the person or entity to whom it is addressed and may contain confidential and/or privileged material. Any disclosure, copying, distribution or other action based upon the information by persons or entities other than the intended recipient is prohibited. If you receive this message in error, please contact the sender and delete the material from any and all computers. Mobistar does not warrant a proper and complete transmission of this information, nor does it accept liability for any delays. *****END OF DISCLAIMER*****
Subject: output_no_debug.txt
apache-rp-biccrm-pherkad -> 370 $VAR1 = undef; chara-http -> 10 $VAR1 = { '1.3.6.1.4.1.2552.200.300.2.1.1.33.10' => 34, '1.3.6.1.4.1.2552.200.300.2.1.1.18.10' => 530, '1.3.6.1.4.1.2552.200.300.2.1.1.26.10' => 13113, '1.3.6.1.4.1.2552.200.300.2.1.1.36.10' => 93, '1.3.6.1.4.1.2552.200.300.2.1.1.28.10' => 14, '1.3.6.1.4.1.2552.200.300.2.1.1.29.10' => 0, '1.3.6.1.4.1.2552.200.300.2.1.1.21.10' => 13113, '1.3.6.1.4.1.2552.200.300.2.1.1.40.10' => 146, '1.3.6.1.4.1.2552.200.300.2.1.1.37.10' => 142, '1.3.6.1.4.1.2552.200.300.2.1.1.19.10' => 52107, '1.3.6.1.4.1.2552.200.300.2.1.1.32.10' => 0 }; chara-http 530 52107 13113 13113 14 0 0 34 93 142 146 domainpartnerportal-faramir -> 856 $VAR1 = { '1.3.6.1.4.1.2552.200.300.2.1.1.32.856' => 19, '1.3.6.1.4.1.2552.200.300.2.1.1.21.856' => 464042, '1.3.6.1.4.1.2552.200.300.2.1.1.37.856' => 1393164, '1.3.6.1.4.1.2552.200.300.2.1.1.18.856' => 1676, '1.3.6.1.4.1.2552.200.300.2.1.1.26.856' => 464042, '1.3.6.1.4.1.2552.200.300.2.1.1.28.856' => 4, '1.3.6.1.4.1.2552.200.300.2.1.1.36.856' => 11, '1.3.6.1.4.1.2552.200.300.2.1.1.19.856' => 957915, '1.3.6.1.4.1.2552.200.300.2.1.1.29.856' => 3186, '1.3.6.1.4.1.2552.200.300.2.1.1.33.856' => 112844, '1.3.6.1.4.1.2552.200.300.2.1.1.40.856' => 14 }; domainpartnerportal-faramir 1676 957915 464042 464042 4 3186 19 112844 11 1393164 14 pherkad-apache-rp-2.0.63_1 -> 35 $VAR1 = undef;
Subject: output_with_debug.txt

Message body is not shown because it is too large.

Subject: snmp-walk_result.txt

Message body is not shown because it is too large.

Subject: getSNMPIndexed
Download getSNMPIndexed
application/octet-stream 1.5k

Message body not shown because it is not plain text.

Subject: RE: [rt.cpan.org #42672] get_entries when previous index does not exist
Date: Fri, 23 Jan 2009 09:17:28 +0100
To: <bug-Net-SNMP [...] rt.cpan.org>
From: "DENIS Laurent" <Laurent.DENIS [...] mail.mobistar.be>
Thanks for your quick answer, I should show this to managers here how prefer to pay K-euros to support companies that never answer you with anything else than "apply the last release" :) Here are the files: snmp-walk_result.txt => ran the snmpwalk on the entire table to check the source of the data getSNMPIndexed => the script. It takes a config file with the oids to fetch + a filter file to restrict the table entries to retrieve. I do this to avoid fetching very huge table from firewalls and dropping 98% of the data output_no_debug => result of the script with no debug output_with_debug => idem with debug siteminderWebAgent.conf => the config file defining the oids Same with -host-port => the filter file Please don't disclose the host name and IPs given, the rest is public. Laurent Show quoted text
-----Original Message----- From: David M. Town via RT [mailto:bug-Net-SNMP@rt.cpan.org] Sent: Thursday, January 22, 2009 4:12 PM To: DENIS Laurent Subject: [rt.cpan.org #42672] get_entries when previous index does not exist <URL: https://rt.cpan.org/Ticket/Display.html?id=42672 > A copy of the script or a least the relevant parts would be helpful. Also running with debug on (-debug => 0xff, in the session() constructor) and providing the output might provide some insight. *****DISCLAIMER***** This electronic transmission (and any attached document) is intended exclusively for the person or entity to whom it is addressed and may contain confidential and/or privileged material. Any disclosure, copying, distribution or other action based upon the information by persons or entities other than the intended recipient is prohibited. If you receive this message in error, please contact the sender and delete the material from any and all computers. Mobistar does not warrant a proper and complete transmission of this information, nor does it accept liability for any delays. *****END OF DISCLAIMER*****

Message body is not shown because sender requested not to inline it.

Download getSNMPIndexed
application/octet-stream 1.5k

Message body not shown because it is not plain text.

Message body is not shown because sender requested not to inline it.

Message body is not shown because sender requested not to inline it.

Download siteminderWebAgent.conf
application/octet-stream 720b

Message body not shown because it is not plain text.

Message body not shown because it is not plain text.

It appears that the agent that you are querying is responding incorrectly. When you specify a start index, the get_entries() method takes that index and subtracts 1 and then performs a get-next-request. In the debug output you provided, the agent when queried for the next value of a nonexistent entries, responds with the lowest value in the next column, not the next entry in the current column: ======= Packet 85 transmitted to 192.168.154.51 ============== SNMP v1(a) ==== Version: version-1 Community Name: public PDU Type: get-next-request Request ID: 56342 Error Status: noError Error Index: 0 Object Name: enterprises.2552.200.300.2.1.1.18.369 Object Value: NULL Object Name: enterprises.2552.200.300.2.1.1.19.369 Object Value: NULL Object Name: enterprises.2552.200.300.2.1.1.21.369 Object Value: NULL Object Name: enterprises.2552.200.300.2.1.1.26.369 Object Value: NULL Object Name: enterprises.2552.200.300.2.1.1.28.369 Object Value: NULL Object Name: enterprises.2552.200.300.2.1.1.29.369 Object Value: NULL Object Name: enterprises.2552.200.300.2.1.1.32.369 Object Value: NULL Object Name: enterprises.2552.200.300.2.1.1.33.369 Object Value: NULL Object Name: enterprises.2552.200.300.2.1.1.36.369 Object Value: NULL Object Name: enterprises.2552.200.300.2.1.1.37.369 Object Value: NULL Object Name: enterprises.2552.200.300.2.1.1.40.369 Object Value: NULL ======= Packet 86 received from 192.168.154.51 =============== SNMP v1(a) ==== Version: version-1 Community Name: public PDU Type: get-response Request ID: 56342 Error Status: noError Error Index: 0 Object Name: enterprises.2552.200.300.2.1.1.19.6 Object Value: 15154 Object Name: enterprises.2552.200.300.2.1.1.20.6 Object Value: 750 Object Name: enterprises.2552.200.300.2.1.1.22.6 Object Value: 1664 Object Name: enterprises.2552.200.300.2.1.1.27.6 Object Value: 0 Object Name: enterprises.2552.200.300.2.1.1.29.6 Object Value: 5008 Object Name: enterprises.2552.200.300.2.1.1.30.6 Object Value: 0 Object Name: enterprises.2552.200.300.2.1.1.33.6 Object Value: 695 Object Name: enterprises.2552.200.300.2.1.1.34.6 Object Value: 0 Object Name: enterprises.2552.200.300.2.1.1.37.6 Object Value: 25512 Object Name: enterprises.2552.200.300.2.1.1.38.6 Object Value: 0 Object Name: enterprises.2552.200.300.2.1.1.41.6 Object Value: 0 Try a "snmpgetnext" from the command line for enterprises.2552.200.300.2.1.1.18.369 and see how the agent responds.
Subject: RE: [rt.cpan.org #42672] get_entries when previous index does not exist
Date: Fri, 23 Jan 2009 16:00:56 +0100
To: <bug-Net-SNMP [...] rt.cpan.org>
From: "DENIS Laurent" <Laurent.DENIS [...] mail.mobistar.be>
My apologies, your lib is correct and my brain is not for missing this. Sorry for wasting your time on this. I'll bother CA support, guess it will take more than a chicken sacrifice to get an answer. Have a nice week-end Laurent Show quoted text
-----Original Message----- From: David M. Town via RT [mailto:bug-Net-SNMP@rt.cpan.org] Sent: Friday, January 23, 2009 3:25 PM To: DENIS Laurent Subject: [rt.cpan.org #42672] get_entries when previous index does not exist <URL: https://rt.cpan.org/Ticket/Display.html?id=42672 > It appears that the agent that you are querying is responding incorrectly. When you specify a start index, the get_entries() method takes that index and subtracts 1 and then performs a get-next-request. In the debug output you provided, the agent when queried for the next value of a nonexistent entries, responds with the lowest value in the next column, not the next entry in the current column: ======= Packet 85 transmitted to 192.168.154.51 ============== SNMP v1(a) ==== Version: version-1 Community Name: public PDU Type: get-next-request Request ID: 56342 Error Status: noError Error Index: 0 Object Name: enterprises.2552.200.300.2.1.1.18.369 Object Value: NULL Object Name: enterprises.2552.200.300.2.1.1.19.369 Object Value: NULL Object Name: enterprises.2552.200.300.2.1.1.21.369 Object Value: NULL Object Name: enterprises.2552.200.300.2.1.1.26.369 Object Value: NULL Object Name: enterprises.2552.200.300.2.1.1.28.369 Object Value: NULL Object Name: enterprises.2552.200.300.2.1.1.29.369 Object Value: NULL Object Name: enterprises.2552.200.300.2.1.1.32.369 Object Value: NULL Object Name: enterprises.2552.200.300.2.1.1.33.369 Object Value: NULL Object Name: enterprises.2552.200.300.2.1.1.36.369 Object Value: NULL Object Name: enterprises.2552.200.300.2.1.1.37.369 Object Value: NULL Object Name: enterprises.2552.200.300.2.1.1.40.369 Object Value: NULL ======= Packet 86 received from 192.168.154.51 =============== SNMP v1(a) ==== Version: version-1 Community Name: public PDU Type: get-response Request ID: 56342 Error Status: noError Error Index: 0 Object Name: enterprises.2552.200.300.2.1.1.19.6 Object Value: 15154 Object Name: enterprises.2552.200.300.2.1.1.20.6 Object Value: 750 Object Name: enterprises.2552.200.300.2.1.1.22.6 Object Value: 1664 Object Name: enterprises.2552.200.300.2.1.1.27.6 Object Value: 0 Object Name: enterprises.2552.200.300.2.1.1.29.6 Object Value: 5008 Object Name: enterprises.2552.200.300.2.1.1.30.6 Object Value: 0 Object Name: enterprises.2552.200.300.2.1.1.33.6 Object Value: 695 Object Name: enterprises.2552.200.300.2.1.1.34.6 Object Value: 0 Object Name: enterprises.2552.200.300.2.1.1.37.6 Object Value: 25512 Object Name: enterprises.2552.200.300.2.1.1.38.6 Object Value: 0 Object Name: enterprises.2552.200.300.2.1.1.41.6 Object Value: 0 Try a "snmpgetnext" from the command line for enterprises.2552.200.300.2.1.1.18.369 and see how the agent responds. *****DISCLAIMER***** This electronic transmission (and any attached document) is intended exclusively for the person or entity to whom it is addressed and may contain confidential and/or privileged material. Any disclosure, copying, distribution or other action based upon the information by persons or entities other than the intended recipient is prohibited. If you receive this message in error, please contact the sender and delete the material from any and all computers. Mobistar does not warrant a proper and complete transmission of this information, nor does it accept liability for any delays. *****END OF DISCLAIMER*****
This was an issue with the agent being queried, not the Net::SNMP module.