Observer Analyzer : Analyzer : SNMP Management Console : The MIB Editor
   
The MIB Editor
 
Page Contents
Understanding a MIB file
Understanding a Request file
Compiled MIBs
Compiling MIBs
Building Expressions
The MIB Editor is where MIBs are compiled and MIB objects are placed in requests to create SNMP Management Console lists, charts, tables, forms, and traps.
MIB—a MIB is a text file in Abstract Syntax Notation One (ASN.1) format, which describes in a structured way the objects an SNMP device supports.
Compiled MIBs—a compiled MIB is a binary file created from a MIB file in preparation for creating requests to be submitted to an SNMP agent.
Device Types (Requests)—a request file is the actual file sent to an SNMP agent, polling and/or setting the states of various MIB objects or OIDs.
The MIB Editor displays compiled MIBs on the left pane of the window and request files on the right pane. Both compiled MIBs and requests are displayed in a familiar Windows tree format. The MIB Editor is used to compile MIBs and create/edit requests.
Understanding a MIB file
MIBs are text files that the creator of an SNMP agent provides to describe the variables the particular agent keeps track of. These variables are called SNMP objects.
 
Often, in the context of SNMP, they are simply referred to as objects.
MIBs have a very specific structure for the organization of objects; any SNMP management console (SNMP Management Console in this case) can use the MIB to form queries of the SNMP agent on a specific device. MIBs are supplied by the manufacturer of the device.
There are two logical sets of statistics that every agent (in theory) should keep track of:
The standard MIB-2 (RFC1213) set or MIB-1 (RFC1066), and
Any proprietary MIB(s) objects.
SNMP is structured this way so that each device can offer standard (MIB-1/2) data that would be common between all network devices (e.g., packets in, packets out), and data that is device-specific (like number of sheets printed on a network printer). MIB-2 is a superset of MIB-1. Sometimes these two sets of MIB objects are combined into one MIB file. Other times you may find that the manufacturer only provides you with a proprietary MIB and expects you to use the RFCMIB-2 (or MIB-1) to view the standard data objects. Unfortunately, there are manufacturers that only offer a subset of objects in the standard MIB(s). In these cases, you can ask the agent for the objects that are missing, but the agent will not respond.
All SNMP agents keep track of some or all of the objects in the standard MIBs (MIB-1 or MIB-2). If you do not have access to a proprietary MIB for your device, you may be able to get all the information you require from the standard MIBs.
 
Understanding a Request file
A request file is built within SNMP Management Console to organize, group, and define specific SNMP requests that may be made of an agent.
 
Each request can be for one or more SNMP objects, and the response to the request may be displayed in list, chart, table, or form format. A number of request files come with SNMP Management Console, but in general, request files are built by you to suit your specific needs with regards to the matrix that your site needs to collect.
When SNMP Management Console polls an SNMP agent for information, a request allows it to receive information about many different objects simultaneously. You can create your own requests (or edit the requests provided) using the MIB Editor.
 
Compiled MIBs
SNMP Management Console compiles the MIB prior to using it to create requests. This is done to save on memory when parsing request responses and to make drag-and-drop request building faster.
 
Your path to begin building requests (lists, charts, tables, or forms) will begin by determining whether SNMP Management Console includes a suitable MIB for your device.
If you have a specific MIB that was included with your device, you should begin by compiling the MIB. See Compiling MIBs below.
If you do not have a specific MIB for your device and the device is not listed on the list of MIBs, you can still use the standard MIBs to create requests for that device. In that case, you will use the standard RFC1213 or RFC1066 MIB to build your requests.
 
Compiling MIBs
Prior to building a request, you may need to compile a MIB. You will need to do this if you have a MIB that was distributed with your device or have received a new MIB for a device. If you don’t have a specific MIB for your device and want additional information on what the standard MIBs provide, you must obtain a MIB from the manufacturer.
Once you have the MIB, you compile it using the MIB Editor. Compiling the MIB is not much more complicated than opening a file. However, some companies do not strictly follow the MIB file format, so you may need to modify the MIB text file. Also, after compiling the MIB file, you must create your own requests.
The MIB Compiler parses MIB text files and converts them into a format that can be used by SNMP Management Console and its utilities. The MIB Compiler is used when you don't have a pre-compiled MIB for a particular SNMP device. You may also need to use the MIB Compiler to recompile a MIB after editing the device MIB file (for example, to correct an error in a manufacturer-supplied MIB file) or to update a manufacturer-supplied MIB file for a new device.
The MIB Compiler expects ASN1-formatted MIB text files which have the MIB Management Console (e.g., RFC1213.MIB).
ASN.1 (Abstract Syntax Notation One) is the standard way, defined by two ISO (International Organization for Standardization) standards, to describe a message that can be sent or received in a network.
ASN.1 is defined in two different places:
The rules of syntax for describing the contents of a message in terms of data types and content sequence or structure is defined by the ISO 8824/ITU X.208 standard.
How you actually encode each data item in a message is defined by the ISO 8825/ITU X.209 standard.
The compile process
1. On the Home tab, in the Tools group, click SNMP > MIB Editor.
2. Select Compile MIB Source File. This opens the Import MIB Source dialog, which lets you select a file to compile.
3. Select the MIB file (*.MIB) you wish to compile. The Save Compiled MIB As dialog will be displayed.
4. Insert the desired file name and click the Next button.
5. The MIB will be compiled and the resulting file (with a .MIC extension) will be placed in the Program Files\Observer\SNMP directory.
6. Once the MIB is successfully compiled, it will be automatically listed in the MIB Editor with the other compiled MIBs.
7. Should the compiler have problems compiling your MIB, the compiler will exit to the MIB Editor and the log will display the errors, listing which MIB line caused the error. Click the Edit Source button to edit the MIB file and correct the error.
8. After correcting the error, simply compile the MIB again. If there are any further errors, the compiler will stop again. Repeat until the MIB successfully compiles.
 
 
Building Expressions
Expressions permit you to take SNMP agent data and derive useful mathematical results.
Raw data that SNMP Management Console receives from SNMP agents can be very useful but, often it’s only the starting point. An SNMP agent on a switch may keep track of the number of data packets the switch has received, the number of packets it has discarded, and the number of packets it has passed along. However, the network administrator may be more interested in the percentage of packets discarded since this may signal a problem with the system.
1. To create a new expression, from the MIB Editor, click on Expressions, then select Mode Commands > New Expression or right-click and select New Expression.
2. From the left pane of the MIB Editor, select any MIB objects that you intend to use in the expression and drag-and-drop them on the new expression.
There may be a slight performance penalty caused by including unnecessary MIB objects in an expression. In terms of system efficiency, it’s best to add only those you need. If you find you need additional MIB objects to create your expression, you can easily add them at a later time by the same drag-and-drop method.
3. Right-click on the new expression to rename it, if desired.
4. Right-click on the renamed expression and select Edit Expression to display the Modify Expression dialog.
Figure 62: Edit Expression
The Modify Expression dialog box is, in effect, a numeric calculator, permitting the creation and modification of mathematical expressions using selected MIB objects, constants, and mathematical operations.
5. Numbers can be entered from the keyboard; mathematical functions can be entered either via the keyboard, or from the buttons of the dialog. The Insert MIB Object button can be used to insert MIB objects that have been dragged to the expression.
6. Click OK to save the edited expression.
 
Now that the new expression has been built, it can be used in a chart.