On 12 January 2011 16:02, Homan, Dave <[email protected]> wrote:
> It appears that the NetSNMP table_dataset.c code DOES create a new row, based
> on the 'createAndGo' setting of my RowStatus object, but does not change it
> to 'active'.
OK - so one issue is the handling of RowStatus values.
> The problem seems to be that snmptable will not retrieve the row after it is
> created.
And another issue is the behaviour of snmptable.
Let's take the second one first:
What happens if you walk the table using "snmpwalk" rather than "snmptable"?
Do you see the whole table?
Do you see the varbinds that you created in the SET request?
How do the entries for this row compare with those from other rows in the table?
What version of the software are you using?
(Both the Net-SNMP agent version, and the version of the mib2c template)
Dave
____________________
Hi Dave,
First, here is the known version information.
The agent is NET-SNMP version: 5.4.2.1.
I'm running Ubuntu Lucid Lynx (Ubuntu 10.04.1 LTS)
The Ubuntu snmpd package version is listed as:
5.4.2.1~dfsg0ubuntu1-0ubuntu2.1.
The Ubuntu libsnmpd-dev package version is listed as:
5.4.2.1~dfsg0ubuntu1-0ubuntu2.1.
The mib2c Perl script version(?) is # $Id: mib2c 16865 2008-03-24 17:54:20Z
dts12 $
The mib2c.create-dataset.conf template contained the following comments:
* Note: this file originally auto-generated by mib2c using
* $Id: mib2c.create-dataset.conf 9375 2004-02-02 19:06:54Z rstory $
Here's the MIB table definition:
managerElementTable OBJECT-TYPE
SYNTAX SEQUENCE OF ManagerElementEntry
MAX-ACCESS not-accessible
STATUS current
DESCRIPTION
"Table of managed elements. A managed element shall have one
entry in this table for each NetworkNode type that element supports."
::= { tmnsConsolidatedManager 1 }
managerElementEntry OBJECT-TYPE
SYNTAX ManagerElementEntry
MAX-ACCESS not-accessible
STATUS current
DESCRIPTION
"Entry in the managerElement Table. A managed element shall
have one entry in this table for each NetworkNode type that element supports."
INDEX { managerElementIndex }
::= { managerElementTable 1 }
ManagerElementEntry ::= SEQUENCE {
managerElementIndex
Unsigned32,
managerElementIP
DisplayString,
managerElementType
TmNSDeviceType,
managerElementStatus
RowStatus
}
managerElementIndex OBJECT-TYPE
SYNTAX Unsigned32
MAX-ACCESS not-accessible
STATUS current
DESCRIPTION
"Index for the managerElementTable. "
DEFVAL { 1 }
::= { managerElementEntry 1 }
managerElementIP OBJECT-TYPE
SYNTAX DisplayString (SIZE(0..255))
MAX-ACCESS read-create
STATUS current
DESCRIPTION
"Element IP address. "
DEFVAL { "" }
::= { managerElementEntry 2 }
managerElementType OBJECT-TYPE
SYNTAX TmNSDeviceType
MAX-ACCESS read-create
STATUS current
DESCRIPTION
"NetworkNode type for the element. "
DEFVAL { tmnsNull }
::= { managerElementEntry 3 }
managerElementStatus OBJECT-TYPE
SYNTAX RowStatus
MAX-ACCESS read-create
STATUS current
DESCRIPTION
"The status of this conceptual row.
To create a row in this table, a manager must
set this object to either createAndGo(4) or
createAndWait(5).
The following objects may not be modified while the
value of this object is active(1):
- managerElementIP
- managerElementType"
::= { managerElementEntry 4 }
I run a subagent that simply manages this table with the handler
created by mib2c.create-dataset.conf - no modifications were
made to the generated managerElementTable.c, .h
In the examples below, I have hidden my community string.
I create a row instance using an snmpset command and get the following response:
snmpset -v 2c -c <community> localhost .1.3.6.1.4.1.31409.3.19.1.1.2.1 s
130.33.46.109 .1.3.6.1.4.1.31409.3.19.1.1.3.1 i 13
.1.3.6.1.4.1.31409.3.19.1.1.4.1 i 4
SNMPv2-SMI::enterprises.31409.3.19.1.1.2.1 = STRING: "130.33.46.109"
SNMPv2-SMI::enterprises.31409.3.19.1.1.3.1 = INTEGER: 13
SNMPv2-SMI::enterprises.31409.3.19.1.1.4.1 = INTEGER: 4
Note that the handler doesn't automatically change RowStatus from
'create-and-go' to 'active'.
I can see the row with snmpget:
snmpget -v 2c -c <community> localhost .1.3.6.1.4.1.31409.3.19.1.1.2.1
.1.3.6.1.4.1.31409.3.19.1.1.3.1 .1.3.6.1.4.1.31409.3.19.1.1.4.1
SNMPv2-SMI::enterprises.31409.3.19.1.1.2.1 = STRING: "130.33.46.109"
SNMPv2-SMI::enterprises.31409.3.19.1.1.3.1 = INTEGER: 13
SNMPv2-SMI::enterprises.31409.3.19.1.1.4.1 = INTEGER: 4
I can manually change the RowStatus to 'active':
snmpset -v 2c -c <community> localhost .1.3.6.1.4.1.31409.3.19.1.1.4.1 i 1
SNMPv2-SMI::enterprises.31409.3.19.1.1.4.1 = INTEGER: 1
But snmptable doesn't see the row:
snmptable -v 2c -c <community> localhost TMNS-MIB::managerElementTable
TMNS-MIB::managerElementTable: No entries
Nor does snmpwalk:
snmpwalk -v 2c -c <community> localhost TMNS-MIB::managerElementTable
TMNS-MIB::managerElementTable = No Such Object available on this agent at this
OID
I tried specifying the table explicitly using its OID:
snmptranslate -On -IR TMNS-MIB::managerElementTable
.1.3.6.1.4.1.31409.3.19.1
snmpwalk -v 2c -c <community> localhost .1.3.6.1.4.1.31409.3.19.1
SNMPv2-SMI::enterprises.31409.3.19.1 = No Such Object available on this agent
at this OID
Repeated calls to snmpgetnext seem to work:
snmpgetnext -v 2c -c <community> localhost .1.3.6.1.4.1.31409.3.19.1.1.1.1
SNMPv2-SMI::enterprises.31409.3.19.1.1.2.1 = STRING: "130.33.46.109"
snmpgetnext -v 2c -c <community> localhost .1.3.6.1.4.1.31409.3.19.1.1.2.1
SNMPv2-SMI::enterprises.31409.3.19.1.1.3.1 = INTEGER: 13
snmpgetnext -v 2c -c <community> localhost .1.3.6.1.4.1.31409.3.19.1.1.3.1
SNMPv2-SMI::enterprises.31409.3.19.1.1.4.1 = INTEGER: 1
Regards,
Dave
This message (and any attachments) contains Sarnoff proprietary information.
Such information may be subject to the terms of confidentiality or other
agreements. If you are not the named addressee, you should not disseminate,
distribute, or copy this email. If you have received this email by mistake,
please notify the sender immediately by email and delete this email from your
system. If you are not the intended recipient, you are notified that
disclosing, copying, distributing, or taking any action in reliance on the
contents of this information is strictly prohibited.
------------------------------------------------------------------------------
Protect Your Site and Customers from Malware Attacks
Learn about various malware tactics and how to avoid them. Understand
malware threats, the impact they can have on your business, and how you
can protect your company and customers by using code signing.
http://p.sf.net/sfu/oracle-sfdevnl
_______________________________________________
Net-snmp-users mailing list
[email protected]
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users