Login  
Search All Forums
Dart Home | PowerSNMP for .NET | Custom Development Reply | PowerSNMP for .NET Topics | Forums   
AuthorForum: PowerSNMP for .NET
Topic: Table Row Index
espc

From: USA
Posts: 14
Member Since: 06/10/15
posted June 22, 2015 1:17 PM

Hello,

Is it possible to get table row index of variables? For instance when I get ifName result output will be:

ifMIB.ifMIBObjects.ifXTable.ifXEntry.ifName.1 = sc0
ifMIB.ifMIBObjects.ifXTable.ifXEntry.ifName.2 = sl0
ifMIB.ifMIBObjects.ifXTable.ifXEntry.ifName.3 = VLAN-1
ifMIB.ifMIBObjects.ifXTable.ifXEntry.ifName.4 = VLAN-1002
ifMIB.ifMIBObjects.ifXTable.ifXEntry.ifName.5 = VLAN-1004
ifMIB.ifMIBObjects.ifXTable.ifXEntry.ifName.6 = VLAN-1005
ifMIB.ifMIBObjects.ifXTable.ifXEntry.ifName.7 = VLAN-1003
ifMIB.ifMIBObjects.ifXTable.ifXEntry.ifName.8 = 7/1
ifMIB.ifMIBObjects.ifXTable.ifXEntry.ifName.9 = 7/2
ifMIB.ifMIBObjects.ifXTable.ifXEntry.ifName.10 = 7/3

Here after ifName (1,2,3...,10) are indexes. Is it possible to get this row index value from snmp response variables?

I am trying to get the response by using GetBulkMessage :

GetBulkMessage request = new GetBulkMessage()
      {
        Community = "public",
        Version = SnmpVersion.Two,
        Destination = IPEndPoint,
        Repetitions = 10
      };

SnmpSocket snmpSocket = new SnmpSocket(manager);

request.Variables.Add(new Variable(mibNodes["1.3.6.1.2.1.2.2.1.3"]));
ResponseMessage response = snmpSocket.GetResponse(request, IPEndPoint);


Thanks.
Nick B (Admin)

From: Utica, NY USA
Posts: 619
Member Since: 05/25/10

Extra Support Options
Custom Application Development

posted June 22, 2015 2:41 PM

Hello,

Yes; to get the row indexer from the response variables, split the Variable.Id string with the period delimiter to get the last sub-id.
espc

From: USA
Posts: 14
Member Since: 06/10/15
posted July 13, 2015 9:26 AM

Hello,

I am having problem while getting row index for JUNIPER-MIB. When i try to get row index for IF-MIB , it is ok. Variable value contains all the information, the format is for instance:
1.3.6.1.2.1.2.2.1.1.1 (ifIndex): 1
Here 1.3.6.1.2.1.2.2.1.1 is ifIndex and the last digit (which is 1) is the row index. And here from the variable value I am able to get numeric oid, textual oid and the value.

In case of JUNIPER-MIB row index has multiple digits and the variable value does not have textual oid. I am trying to get the response for .1.3.6.1.4.1.2636.3.1.13.1(jnxOperatingEntry) oid with snmp walk. And variable value has numeric oids only, probably the reason is here indexes consist of multiple digits and somehow it can not map numeric oids to textual oids in this case.

For instance ;
.1.3.6.1.4.1.2636.3.1.13.1.1(jnxOperatingContentsIndex) - Here when you get next OID, the next OID is:
.1.3.6.1.4.1.2636.3.1.13.1.1.1.1.0.0 and its textual OID must be (jnxOperatingContentsIndex.1.1.0.0), in this case row index is 1.1.0.0. In case of ifIndex row indexes are single digits and they increase sequentially.

I hope the problem description is clear, please let me know if you need any other details. I can not attach file or screenshot but there is tree view for juniper mib here : http://www.mibdepot.com/cgi-bin/getmib3.cgi?win=mib_a&i=1&n=JUNIPER-MIB&r=juniper&f=mib-jnx-chassis_2&v=v2&t=tbl&o=jnxOperatingTable

If you provide me an email address I can send you the mib file as well.
Jason Farrar (Admin)

From: Oneida, NY USA
Posts: 223
Member Since: 07/24/07

Extra Support Options
Custom Application Development

posted July 13, 2015 11:49 AM

Hello,

Is the issue that when using a multi-indexed table the Variable class is not mapping up the textual OID with the numerical OID correctly?

If that isn't the issue can you please clarify?

Thanks.
espc

From: USA
Posts: 14
Member Since: 06/10/15
posted July 13, 2015 1:37 PM

Hello,

Yes that is the problem, MIB syntax for jnxOperatingEntry entry is like below. Variable class can not resolve textual OIDs with numerical OIDs when multi index table is used. Fo instance it gives me "1.3.6.1.4.1.2636.3.1.13.1.1.1.1.0.0" instead of (jnxOperatingContentsIndex.1.1.0.0).

  jnxOperatingTable OBJECT-TYPE
SYNTAX SEQUENCE OF JnxOperatingEntry
MAX-ACCESS not-accessible
STATUS current
DESCRIPTION
"A list of operating status entries."
::= { jnxBoxAnatomy 13 }

  jnxOperatingEntry OBJECT-TYPE
SYNTAX JnxOperatingEntry
MAX-ACCESS not-accessible
STATUS current
DESCRIPTION
"An entry of operating status table."
INDEX { jnxOperatingContentsIndex,
 jnxOperatingL1Index,
 jnxOperatingL2Index,
 jnxOperatingL3Index }
::= { jnxOperatingTable 1 }
Jason Farrar (Admin)

From: Oneida, NY USA
Posts: 223
Member Since: 07/24/07

Extra Support Options
Custom Application Development

posted July 14, 2015 5:40 PM

Hello,

The ifentry example you provided is simply matching the incoming variable IID to the OID in the entities MibNodes collection and using MibNode.Name. As such, it would not generate a textual OID like jnxOperatingContentsIndex.1.1.0.0.

At best it would match to the last OID and insert it's name there.

That being said, you may be able to use MibNodes.GetByIid(Variable.Id) to retrieve the MibNode and then MibNode.GetFullName(MibNodes) to get the complete Textual Oid for the node.

I've entered a feature request (#689) for reviewing possible improvements for ToString in the next release.

Regards.
espc

From: USA
Posts: 14
Member Since: 06/10/15
posted July 16, 2015 11:08 AM

I see, so it GetName method will return jnxOperatingContentsIndex. As I understand it is not possible to get index (1.1.0.0) , I could concatenate return value and index and construct full textual oid if it would be possible to get index somehow.

Thank you , we will be watching next releases.
espc

From: USA
Posts: 14
Member Since: 06/10/15
posted January 9, 2019 8:39 AM

Hello,

Is this issue fixed with current releases?

Thank you
Jamie Powell (Admin)

From: Rome, NY USA
Posts: 448
Member Since: 03/13/07

Extra Support Options
Custom Application Development

posted January 9, 2019 10:37 AM

Thank you for your email. This feature has not yet been added to the product. If your need is immediate, please contact sales@dart.com for custom options.

All the best,
Jamie
Jamie Powell (Admin)

From: Rome, NY USA
Posts: 448
Member Since: 03/13/07

Extra Support Options
Custom Application Development

posted January 9, 2019 11:53 AM

I apologize for the confusion. I have done some additional research and it appears a solution may have been released. Please contact me at sales@dart.com so we can discuss further details.

Regards,
Jamie
Reply | PowerSNMP for .NET Topics | Forums   
This site is powered by PowerTCP WebServer Tool PowerTCP WebServer for ActiveX