Hi Paul,
There are indeed many errors in that MIB
which makes it unusable for MIB Explorer
(causing the error you quoted). That's why
using the lenient import is at your own
risk ;-)
A syntactically correct version of the MIB is:
MIB-TEST DEFINITIONS ::= BEGIN
IMPORTS Integer32, enterprises, Unsigned32,
OBJECT-TYPE, MODULE-IDENTITY FROM SNMPv2-SMI
OBJECT-GROUP FROM SNMPv2-CONF;
functionalarea MODULE-IDENTITY
LAST-UPDATED "200902110000Z"
ORGANIZATION "My Organistation"
CONTACT-INFO ""
DESCRIPTION "My MIB"
::= { component 3 }
mycompany OBJECT IDENTIFIER ::= { enterprises 999999 }
component OBJECT IDENTIFIER ::= { mycompany 1 }
-- functionalarea OBJECT IDENTIFIER ::= { component 3 }
connectedServiceQueueSizes OBJECT-TYPE
SYNTAX SEQUENCE OF ConnectedServiceQueueSizeEntry
MAX-ACCESS not-accessible
STATUS current
DESCRIPTION ""
::= { functionalarea 1 }
connectedServiceQueueSizeEntry OBJECT-TYPE
SYNTAX ConnectedServiceQueueSizeEntry
MAX-ACCESS not-accessible
STATUS current
DESCRIPTION ""
INDEX { serviceID }
::= { connectedServiceQueueSizes 1 }
ConnectedServiceQueueSizeEntry ::= SEQUENCE {
serviceID Unsigned32,
queueSize Integer32
}
serviceID OBJECT-TYPE
SYNTAX Unsigned32
MAX-ACCESS not-accessible
STATUS current
DESCRIPTION ""
::= { connectedServiceQueueSizeEntry 1 }
queueSize OBJECT-TYPE
SYNTAX Integer32
MAX-ACCESS read-only
STATUS current
DESCRIPTION ""
::= { connectedServiceQueueSizeEntry 2 }
functionalareaCompl OBJECT IDENTIFIER
::= { functionalarea 2 }
functionalareaBasicGroup OBJECT-GROUP
OBJECTS { queueSize }
STATUS current
DESCRIPTION "Basic objects"
::= { functionalareaCompl 1 }
END
The most common MIB design issues are described
on:
http://www.mibdesigner.com/html/mibdesign.html
This site might help you when completing your
MIB.
Best regards,
Frank
Paul Mellor wrote:
I'm not sure the mailing list software appreciated me attaching a file, so
I've pasted the MIB in below:
MIB-TEST DEFINITIONS ::= BEGIN
IMPORTS Integer32, enterprises FROM SNMPv2-SMI
OBJECT-TYPE FROM RFC-1212;
mycompany OBJECT IDENTIFIER ::= { enterprises 999999 }
component OBJECT IDENTIFIER ::= { mycompany 1 }
functionalarea OBJECT IDENTIFIER ::= { component 3 }
connectedServiceQueueSizes OBJECT-TYPE
SYNTAX SEQUENCE OF ConnectedServiceQueueSizeEntry
MAX-ACCESS not-accessible
STATUS current
::= { functionalarea 1 }
connectedServiceQueueSizeEntry OBJECT-TYPE
SYNTAX ConnectedServiceQueueSizeEntry
MAX-ACCESS not-accessible
STATUS current
INDEX { serviceID }
::= { connectedServiceQueueSizes 1 }
ConnectedServiceQueueSizeEntry ::= SEQUENCE {
serviceID Integer32,
queueSize Integer32
}
serviceID OBJECT-TYPE
SYNTAX Integer32
MAX-ACCESS not-accessible
STATUS current
::= { connectedServiceQueueSizeEntry 1 }
queueSize OBJECT-TYPE
SYNTAX Integer32
MAX-ACCESS read-only
STATUS current
::= { connectedServiceQueueSizeEntry 2 }
END
-----Original Message-----
From: [email protected] [mailto:[email protected]] On
Behalf Of Paul Mellor
Sent: 11 February 2009 10:38
To: 'Frank Fock'
Cc: [email protected]
Subject: RE: [SNMP4J] Recommended client for monitoring SNMP tables?
Hi Frank,
Thanks for the tip - I've downloaded MIB Explorer, but unfortunately when
using the attached MIB file I'm encountering the following problems:
1) When importing the MIB, I'm encountering 4 instances of the following
syntax error: "Error 1000: Encountered "MAX-ACCESS" Was expecting:
"ACCESS"...". Can you see what the problem is? My MIB newbie eyes can't
see any difference between my MIB and similar table definitions in other MIB
files.
2) If I go ahead and choose to import the MIB with the most lenient syntax
checks, I get the following exception when attempting to browse down through
the tree to the node for the defined table (which I concede may well be due
to the flawed MIB!):
Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
at
com.agentpp.mib.MIBObjectType.getSubTypeString(MIBObjectType.java:76)
at
com.agentpp.explorer.ExplorerTreeCellRenderer.getTreeCellRendererComponent(U
nknown Source)
at
javax.swing.plaf.basic.BasicTreeUI$NodeDimensionsHandler.getNodeDimensions(U
nknown Source)
at javax.swing.tree.AbstractLayoutCache.getNodeDimensions(Unknown
Source)
at
javax.swing.tree.VariableHeightLayoutCache$TreeStateNode.updatePreferredSize
(Unknown Source)
at
javax.swing.tree.VariableHeightLayoutCache$TreeStateNode.getPreferredWidth(U
nknown Source)
at
javax.swing.tree.VariableHeightLayoutCache.getMaxNodeWidth(Unknown Source)
at
javax.swing.tree.VariableHeightLayoutCache.getPreferredWidth(UnknownSource)
at
javax.swing.plaf.basic.BasicTreeUI.updateCachedPreferredSize(UnknownSource)
at javax.swing.plaf.basic.BasicTreeUI.getPreferredSize(Unknown
Source)
at javax.swing.plaf.basic.BasicTreeUI.getPreferredSize(Unknown
Source)
at javax.swing.JComponent.getPreferredSize(Unknown Source)
at javax.swing.ScrollPaneLayout.layoutContainer(Unknown Source)
at java.awt.Container.layout(Unknown Source)
at java.awt.Container.doLayout(Unknown Source)
at java.awt.Container.validateTree(Unknown Source)
at java.awt.Container.validateTree(Unknown Source)
at java.awt.Container.validateTree(Unknown Source)
at java.awt.Container.validateTree(Unknown Source)
at java.awt.Container.validateTree(Unknown Source)
at java.awt.Container.validateTree(Unknown Source)
at java.awt.Container.validateTree(Unknown Source)
at java.awt.Container.validate(Unknown Source)
at sun.awt.windows.WComponentPeer$1.run(Unknown Source)
at java.awt.event.InvocationEvent.dispatch(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown
Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown
Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)
Apologies if this isn't the correct forum to discuss MIB Explorer issues,
but any help would be much appreciated!
Thanks
Paul
-----Original Message-----
From: Frank Fock [mailto:[email protected]]
Sent: 10 February 2009 17:32
To: Paul Mellor
Cc: [email protected]
Subject: Re: [SNMP4J] Recommended client for monitoring SNMP tables?
Hi Paul,
You have taken my MIB Explorer Pro into
account yet?
An evaluation version is available from
http://www.mibexplorer.com
The upcoming 3.0 release will get a DB
interface to put monitored values directly into a SQL database (DB2, Oracle,
MySQL, etc.).
I am not sure if that is what you are
looking?
Best regards,
Frank
Paul Mellor wrote:
Hi,
I've used the SNMP4JAgent library to add agent functionality to my
server that returns both scalar and tabular SNMP objects (that have a
fixed
number
of columns but a variable number of rows), which works great. Whilst
developing, I have been using Paessler's PRTG and SNMP helper software
to test my OIDs. This works fine with the scalar objects, and allows
me to access cells in the tabular objects if I include the column and
index values.
However, for production it would be much nicer if the network
monitoring client would take the OID of the whole table and then
determine the table state (using the GETNEXT command) itself and
present a graphical view of
the
table structure and contents. Does anyone know of any client that is
capable of doing this?
Thanks
Paul
_______________________________________________
SNMP4J mailing list
[email protected]
http://lists.agentpp.org/mailman/listinfo/snmp4j
--
AGENT++
http://www.agentpp.com
http://www.mibexplorer.com
http://www.mibdesigner.com
_______________________________________________
SNMP4J mailing list
[email protected]
http://lists.agentpp.org/mailman/listinfo/snmp4j