Dear All:
When walk to "myTestSecondField1", then break, and show "problem
encountered in myTestSecondFieldTable_handler: unknown column" in
/var/log/snmpd.log.
I use version 5.3.1.
My friend tell me, the version 5.2.2 can not.
B/R,
Jack
I use this MIB text file:
MY-TEST-MIB.my
MY-TEST-MIB DEFINITIONS ::= BEGIN
-- A Comment!
-- IMPORTS: Include definitions from other mibs here, which is always
-- the first item in a MIB file.
IMPORTS
netSnmpExamples FROM NET-SNMP-EXAMPLES-MIB
Unsigned32, TimeTicks, Counter64,
MODULE-IDENTITY FROM SNMPv2-SMI
MODULE-COMPLIANCE, OBJECT-GROUP FROM SNMPv2-CONF
RowStatus FROM SNMPv2-TC
;
--
-- A brief description and update information about this mib.
--
myTestMIB MODULE-IDENTITY
LAST-UPDATED "200301130000Z"
ORGANIZATION "itri"
CONTACT-INFO "postal: Wes Hardaker
P.O. Box 382
Davis CA 95617
email: [EMAIL PROTECTED]
"
DESCRIPTION "A simple mib for demonstration purposes.
"
::= { netSnmpExamples 6 }
-- myTestMIBObjects
myTestMIBObjects OBJECT IDENTIFIER ::= { myTestMIB 1 }
myTestNotifications OBJECT IDENTIFIER ::= { myTestMIB 2 }
myTestFirstFieldU32 OBJECT-TYPE
SYNTAX Unsigned32
MAX-ACCESS read-write
STATUS current
DESCRIPTION
"This is an object that simply supports a writable integer
when compiled into the agent. See
http://www.net-snmp.org/tutorial-5/toolkit/XXX for further
implementation details."
::= { myTestMIBObjects 1 }
myTestFirstFieldU16 OBJECT-TYPE
SYNTAX Unsigned32 (0..65535)
MAX-ACCESS read-write
STATUS current
DESCRIPTION
"This is an object that simply supports a writable integer
when compiled into the agent. See
http://www.net-snmp.org/tutorial-5/toolkit/XXX for further
implementation details."
::= { myTestMIBObjects 2 }
myTestSecondFieldTable OBJECT-TYPE
SYNTAX SEQUENCE OF MyTestSecondFieldEntry
MAX-ACCESS not-accessible
STATUS current
DESCRIPTION
"myTestSecondFieldTable."
::= { myTestMIBObjects 3 }
myTestSecondFieldEntry OBJECT-TYPE
SYNTAX MyTestSecondFieldEntry
MAX-ACCESS not-accessible
STATUS current
DESCRIPTION "An entry in the myTestSecondFieldTable."
INDEX { ifIndex }
::= { myTestSecondFieldTable 1 }
MyTestSecondFieldEntry ::=
SEQUENCE
{
myTestSecondField1 Unsigned32,
myTestSecondField2 Unsigned32,
myTestSecondField3 OCTET STRING (SIZE
(1..32)),
myTestSecondField4 TimeTicks,
myTestSecondFieldRowStatus RowStatus,
}
myTestSecondField1 OBJECT-TYPE
SYNTAX Unsigned32
MAX-ACCESS read-create
STATUS current
DESCRIPTION
"myTestSecondField1."
::= { myTestSecondFieldEntry 1 }
myTestSecondField2 OBJECT-TYPE
SYNTAX Unsigned32
MAX-ACCESS read-create
STATUS current
DESCRIPTION
"myTestSecondField2."
::= { myTestSecondFieldEntry 3 }
myTestSecondField3 OBJECT-TYPE
SYNTAX OCTET STRING (SIZE (1..32))
MAX-ACCESS read-create
STATUS current
DESCRIPTION
"myTestSecondField3."
::= { myTestSecondFieldEntry 6 }
myTestSecondField4 OBJECT-TYPE
SYNTAX TimeTicks
UNITS "1/100th Seconds"
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"myTestSecondField4."
::= { myTestSecondFieldEntry 10 }
myTestSecondFieldRowStatus OBJECT-TYPE
SYNTAX RowStatus
MAX-ACCESS read-create
STATUS current
DESCRIPTION
"myTestSecondFieldRowStatus."
::= { myTestSecondFieldEntry 15 }
myTestThirdFieldTable OBJECT-TYPE
SYNTAX SEQUENCE OF MyTestThirdFieldEntry
MAX-ACCESS not-accessible
STATUS current
DESCRIPTION
"myTestThirdFieldTable."
::= { myTestMIBObjects 4 }
myTestThirdFieldEntry OBJECT-TYPE
SYNTAX MyTestThirdFieldEntry
MAX-ACCESS not-accessible
STATUS current
DESCRIPTION "An entry in the myTestThirdFieldTable."
INDEX { ifIndex, myTestThirdFieldIndex }
::= { myTestThirdFieldTable 1 }
MyTestThirdFieldEntry ::=
SEQUENCE
{
myTestThirdFieldIndex Unsigned32,
myTestThirdField1 Unsigned32,
myTestThirdFieldRowStatus RowStatus,
}
myTestThirdFieldIndex OBJECT-TYPE
SYNTAX Unsigned32
MAX-ACCESS not-accessible
STATUS current
DESCRIPTION "Second Index."
::= { myTestThirdFieldEntry 1 }
myTestThirdField1 OBJECT-TYPE
SYNTAX Unsigned32
MAX-ACCESS read-create
STATUS current
DESCRIPTION
"myTestThirdField1."
::= { myTestThirdFieldEntry 2 }
myTestThirdFieldRowStatus OBJECT-TYPE
SYNTAX RowStatus
MAX-ACCESS read-create
STATUS current
DESCRIPTION
"myTestThirdFieldRowStatus."
::= { myTestThirdFieldEntry 3 }
myTestFourFieldU64 OBJECT-TYPE
SYNTAX Counter64
MAX-ACCESS read-write
STATUS current
DESCRIPTION
"This is an object that simply supports a writable integer
when compiled into the agent. See
http://www.net-snmp.org/tutorial-5/toolkit/XXX for further
implementation details."
::= { myTestMIBObjects 5 }
myTestNotification1 NOTIFICATION-TYPE
OBJECTS {
Unsigned32,
Unsigned32,
}
STATUS current
DESCRIPTION
"myTestNotification1."
::= { myTestNotifications 1 }
myTestNotification2 NOTIFICATION-TYPE
OBJECTS {
Unsigned32,
Unsigned32,
}
STATUS current
DESCRIPTION
"myTestNotification2."
::= { myTestNotifications 2 }
myTestNotification3 NOTIFICATION-TYPE
OBJECTS {
Unsigned32,
Unsigned32,
Unsigned32,
}
STATUS current
DESCRIPTION
"myTestNotification3."
::= { myTestNotifications 3 }
myTestNotification4 NOTIFICATION-TYPE
OBJECTS {
Unsigned32,
Unsigned32,
Unsigned32,
Unsigned32,
}
STATUS current
DESCRIPTION
"myTestNotification4."
::= { myTestNotifications 4 }
END
And modify NET-SNMP-EXAMPLES-MIB.my like below:
NET-SNMP-EXAMPLES-MIB DEFINITIONS ::= BEGIN
--
-- Example MIB objects for agent module example implementations
--
IMPORTS
MODULE-IDENTITY, OBJECT-TYPE, Integer32 FROM SNMPv2-SMI
SnmpAdminString FROM SNMP-FRAMEWORK-MIB
netSnmp FROM NET-SNMP-MIB
RowStatus, StorageType FROM SNMPv2-TC
InetAddressType, InetAddress FROM INET-ADDRESS-MIB
;
netSnmpExamples MODULE-IDENTITY
LAST-UPDATED "200202060000Z"
ORGANIZATION "www.net-snmp.org"
CONTACT-INFO
"postal: Wes Hardaker
P.O. Box 382
Davis CA 95617
email: [EMAIL PROTECTED]"
DESCRIPTION
"Example MIB objects for agent module example implementations"
REVISION "200202060000Z"
DESCRIPTION
"First draft"
::= { netSnmp 2 }
--
-- top level structure
--
netSnmpExampleScalars OBJECT IDENTIFIER ::= { netSnmpExamples 1 }
netSnmpExampleTables OBJECT IDENTIFIER ::= { netSnmpExamples 2 }
netSnmpExampleNotifications OBJECT IDENTIFIER ::= { netSnmpExamples 3 }
-- netSnmpTutorial OBJECT IDENTIFIER ::= { netSnmpExamples 4 }
-- EbacDevice OBJECT IDENTIFIER ::= { netSnmpExamples 5 }
myTest OBJECT IDENTIFIER ::= { netSnmpExamples 6 }
--
-- Example scalars
--
....
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users