[SNMP4J] properties values for table having 2 indexes
jostph at bluewin.ch
jostph at bluewin.ch
Wed Jan 26 15:45:12 CET 2011
Hi all,
I’m starting using SNMP4J to implement an Agent which
for the first returns static MIB values defined in a properties file.
(syntax as described in
http://www.snmp4j.org/agent/doc/org/snmp4j/agent/io/prop/PropertyMOInput.html)
This work fine for scalar value, but I'm stuck by defining values
for a table defined with 2 indexes.
I've tried different approaches like providing only the first index
or defining all column values as if there weren't any index, none of
them work
(I'm sending get-next requests for the OID TestEquipmentEntry
xxxxx.3.1)
snmp4j.agent.cfg.oid.xxxxx.3.1=1:5
snmp4j.agent.cfg.value.xxxxx.3.1.0.0={i}51
snmp4j.agent.cfg.value.xxxxx.3.1.0.1={i}0
snmp4j.agent.cfg.value.xxxxx.3.1.0.2={i}2
snmp4j.agent.cfg.value.xxxxx.3.1.0.3={s}description
snmp4j.agent.cfg.value.xxxxx.3.1.0.4={s}id
Anyone of you having already defined such tables in the properties file
and
who knows how to do it properly?
----
Thx you in advance for your help.
Philippe
MIB definition of the table:
testEquipmentTable OBJECT-TYPE
SYNTAX SEQUENCE OF TestEquipmentEntry
MAX-ACCESS not-accessible
STATUS current
DESCRIPTION
"The enclosed equipments table."
::= { testComponentInfo 3 }
testEquipmentEntry OBJECT-TYPE
SYNTAX TestEquipmentEntry
MAX-ACCESS not-accessible
STATUS current
DESCRIPTION
"An entry in the enclosed equipments table."
INDEX { testEquipmentType, testEquipmentIndex }
::= { testEquipmentTable 1 }
TestEquipmentEntry ::=
SEQUENCE {
testEquipmentType
TestEquipmentType,
testEquipmentIndex
Unsigned32,
testEquipmentSupStatus
TestSupervisionStatus,
testEquipmentDescription
DisplayString,
testEquipmentId
DisplayString
}
testEquipmentType OBJECT-TYPE
SYNTAX TestEquipmentType
MAX-ACCESS read-create
STATUS current
DESCRIPTION
"Type of the equipment. It is combined with
testEquipmentIndex to access the table elements."
::= { testEquipmentEntry 1 }
testEquipmentIndex OBJECT-TYPE
SYNTAX Unsigned32
MAX-ACCESS read-create
STATUS current
DESCRIPTION
"Occurence of the equipment. It is combined with
testEquipmentType to access the table elements."
::= { testEquipmentEntry 2 }
testEquipmentSupStatus OBJECT-TYPE
SYNTAX TestSupervisionStatus
MAX-ACCESS read-create
STATUS current
DESCRIPTION
"Supervision status of the equipment."
::= { testEquipmentEntry 3 }
testEquipmentDescription OBJECT-TYPE
SYNTAX DisplayString (SIZE (0..255))
MAX-ACCESS read-create
STATUS current
DESCRIPTION
"Short description of the equipment."
::= { testEquipmentEntry 4 }
testEquipmentId OBJECT-TYPE
SYNTAX DisplayString (SIZE (0..255))
MAX-ACCESS read-create
STATUS current
DESCRIPTION
"Unique identifier of a the equipment",
::= { testEquipmentEntry 5 }
More information about the SNMP4J
mailing list