The MIB Editor
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.
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.
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.
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.
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. To compile a new MIB, open the MIB Editor by selecting > .
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.
As described earlier in this section, requests are built from MIB objects and can be displayed in list, chart, table, or form format. Requests are grouped together in a request file. Request files contain folders for each format of request: chart, list, table, form, and trap.
SNMP Management Console includes a number of pre-built request files that can be used as is or modified to suit your specific needs. Most users will find that the included request files, possibly modified, will serve quite well.
Requests can contain objects from one MIB or many separate MIBs. Once built and saved, requests are displayed in a tree structure for each agent that the request file is associated with.
When adding a new SNMP Agent, you must specify a request file. All configured requests for the agent become available each time the newly-registered SNMP agent entry is selected. You can remove requests from an agent or add newly-created requests to an agent using the MIB Editor.
To receive information about an object, SNMP Management Console polls an SNMP agent by sending a request packet. The request packet can combine one or more object IDs. When the agent receives the request, it searches its databases, retrieves object values, composes a reply, and sends the reply as a reply packet back to SNMP Management Console.
The structure of the SNMP polling process suggests that an SNMP request can be considered a single object. By combining several SNMP objects in a single request, the same requests can be used for all SNMP agents using the same MIB.
The MIB Editor provides this functionality for SNMP Management Console by allowing you to design requests for each agent. When you configure a new SNMP agent, you designate its request file in the SNMP Agent Properties dialog.
Why build custom requests?
The request files that are included as part of the SNMP Management Console package will serve most user’s needs most of the time; however, there may be situations where it can be advantageous to build custom requests. RFC1213 includes methods for manufacturers to define SNMP objects not specifically defined (in effect, proprietary MIB objects). In some cases, a manufacturer may not have precisely adhered to the RFC1213 specification and mislabeled an object.
Custom requests allow the SNMP Management Console to work with SNMP agents that interact with objects not directly defined in RFC1213, and in dealing with badly-formed SNMP agents.
Another advantage of custom requests is the ability to share them. For example, a network administrator in a large corporation may need to create a periodic report about network traffic. Four other network administrators from the same corporation, located in different states, must create similar reports about their network segments. By creating a single, uniform custom request, it is possible to easily compare the performance of the network segments on the important criteria.
Yet another advantage of custom requests is to avoid data overload. While SNMP and its proprietary features can provide a mountain of information, only some of it will be relevant in a given situation. By either modifying standard requests to eliminate extraneous data, or by creating custom requests from scratch, you will be able to create displays of information that are useful to your specific situation. For example, RFC1213 defines twenty different ICMP objects, but much of the time, most network administrators will find themselves interested in only one or two. By creating a custom chart, the network administrator can focus more on what’s relevant by eliminating the display of the extraneous.
Custom requests also provide a way for a network administrator to:
♦Design a standard for obtaining exactly the information needed;
♦Prepare information in a way more easily understood by less technically-oriented people, and;
♦Share the standard with other administrators.
Through discussion and testing, a comprehensive set of custom requests can be developed to obtain consistent sets of data customized for an organization's particular needs.
Adding support for a new SNMP device by creating a custom request file
1. To create a custom request file, from the MIB Editor click on the Create New Request icon.
2. The Add New Device Type dialog will be displayed.
Figure 67: Custom request file
3. Name the request file.
4. Leave the Add default RFC1213 requests to the new file selected, if desired.
5. Click the Create button.
6. The new request tree on the right hand side of the MIB Editor will be displayed. Note the new request items that are now available: Charts, Expressions, Forms, Lists, Tables, and Traps.
Figure 68: SNMP MIB Editor
Building and modifying charts
Much of what is done in the MIB Editor when building and modifying charts is similar to what can be done from the Agent Display window. There are two significant differences when modifying a chart from the MIB Editor:
♦Changes, once saved, are permanent. When changes are made from the Agent Display, they are for that session only.
♦More features of the chart can be modified by the MIB Editor.
1. To create a new, blank chart, right-click on Charts and select New Chart. A new chart, entitled New Chart will be created.
2. Drag-and-drop any non-table MIB object from the left-hand pane of the MIB Editor onto the chart (remember: charts cannot display tabular data).
A MIB object can be copied from any available compiled MIB. Only those MIB objects that have been copied to the chart can be monitored by the chart.
Figure 70: Copying a MIB object
After completing this task:
While it’s certainly possible to copy a myriad of MIB objects to the chart and only use a few, it’s generally a better idea to copy only those objects you plan on charting with that particular chart.
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 > 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 71: 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. Building and modifying charts
Building list and table requests
The same actions can be taken to build tables.
1. To create a new list, from the MIB Editor, click on Lists, then right-click and select New List.
2. SNMP Management Console will create a new list. Rename the list whatever you find appropriate.
3. Open the MIB tree for the MIB you would like to use.
4. Display the objects you want to include on your list, highlight the objects, and drag the objects from the MIB tree listing to the request file tree.
You may use MIB objects from two or more different compiled MIBs.
5. Once complete, click the Save Request File icon. The new list will be available for all Agents that use this request file.
Building trap requests
A trap is an event that an SNMP Agent (the actual hardware or software agent, not SNMP Management Console’s Agent request) can be configured to automatically report to the management program, in this case SNMP Extension. RFC1157 defines seven traps, any, all, or none of which may be supported by a given SNMP Agent.
To find out which, if any, SNMP traps your device supports, please consult the documentation for that device.
When the Agent has been configured to report a trap and a trap event occurs, the Agent will report the trap to the management program without having to be polled.
For example, one defined trap is the coldStart trap. A device with an SNMP agent that supports this trap will issue this trap when the device is performing a cold boot (or reboot), one where the device’s configuration or implementation may be altered. Another is the warmStart trap, which is issued when a warm boot is occurring.
The advantage of a trap is that the management program does not have to repeatedly query the agent for the trap condition. Like an alarm clock going off at a pre-set time, when a configured trap event occurs, it notifies SNMP agent without having to be asked.
There are some inherent limitations to traps. A trap can only be sent from a properly-functioning SNMP Agent, so it’s impossible for a router to send a trap announcing that it’s down. Since a trap is configured in the SNMP Agent itself, it’s relatively inflexible. Further, since traps are sent via UDP (a protocol that does not include method for verifying that a packet has been received), the SNMP Agent has no way of knowing if the trap has been received and acted on.
1. To add a trap to an SNMP request, simply drag a trap from a compiled MIB and drop it on the trap tree of the MIB request.
2. Right-click on the trap to bring up the Trap Properties dialog. The boxes on the Trap Properties tab will always be grayed out, as there is no configuration of the traps themselves; traps are simply either monitored or not monitored by SNMP Management Console.
3. Click on the Set Triggers tab to configure the trap’s alarms and to display the Set Triggers tab.
Alarm actions can be set independently. It is possible to configure some, none, or all of the possible alarm actions to happen when the trap is received.
Send e-mail message
if selected, a triggering event will cause an e-mail message to be sent to a designated recipient as configured in Options >Observer General Options > e-mail Notifications. Enter the message in the e-mail message.
Page phone number
if selected, a triggering event will cause a pager message to be sent to the recipient designated in Options > Observer General Options > Notifications.
Play sound file
if selected, a triggering event will cause a sound file to be played.
Execute command line
if selected, a triggering event will cause a DOS or Windows program to be run.
Only one command will be executed. If you need or wish to have more than one program run, you may set up a batch file (e.g., WARNINGS.BAT) as the command line to be executed. You can then use a text editor to create WARNINGS.BAT and enter multiple commands in that batch file.
Designing and building forms
SNMP Extension's Forms Editor is a full-function forms designer enabling you to display information in a variety of formats and to actively interact with SNMP devices. While SNMP Management Console comes with several sample forms, it is possible for you to design custom forms.
1. To build a new form, from the MIB Editor, click on Forms, then right-click and select New Form.
2. SNMP Management Console will create a new form. Rename the form whatever you find appropriate.
3. Open the MIB tree for the MIB you would like to use.
4. Display the objects you want to include on your list, highlight the objects, and drag the objects from the MIB tree listing to the Request file tree.
5. Right-click on the form and select Edit Forms Control to display the Form Editor dialog.
Figure 72: Editing a form
You can toggle the form between Edit Mode and Preview Mode. In Preview Mode, while the form will not display any actual data, it is possible to test buttons and list forms.
Setting an expression
1. Click the Set Expression button. The Choose Expression dialog box will be displayed.
2. The upper pane will contain those expressions available in the present SNMP request. Select any expression and click the Next button.
3. The Set Expression Indexes dialog will be displayed.
4. Select the index you wish to modify and enter your chosen value in the Assign index value. Click the Finish button.
5. The Edit Field Properties dialog will be redisplayed.
Figure 73: Edit Range and Values
1. Click on the __ line.
2. Click on the icon to choose the default bitmap to be displayed.
3. For each value or range of values you wish to be represented by a different bitmap, click on the Add new button.
4. Enter the value or range in the appropriate edit boxes, then click on the icon to set the bitmap for that range.