Understanding MIB Tools

The following sections provide information about the tasks required for managing SNMP devices using the MIB Compiler and the MIB Browser.


About MIBs

To manage a device, you must obtain a copy of the MIB or MIBs that the device supports. A MIB is an ASCII text file, written in a precise format that describes the management information available on a particular class of devices. If, for example, you have an XYZ router from company X and you want to use Novell ZENworks Server Management for managing the router, company X must provide you with the XYZ router MIB. Novell ZENworks Server Management provides many standard and vendor-proprietary MIBs, which are found in the MIB Pool folder in the MIB Server Pool folder. By default, Novell ZENworks Server Management compiles the most generally applicable of these MIBs.

If you want to compile any new MIBs, you must store them in the MIB Pool folder in the MIB Server Pool folder. The console user can select or remove MIB files from the MIB Pool folder in the MIB Server Pool folder. The MIB Compiler compiles the files listed in the MIB Pool folder in the MIB Server Pool folder.


Understanding the SNMP MIB Compiler

The MIB Compiler does the following:

The following figure demonstrates how the MIB Compiler incorporates information from the MIB files into the Novell ZENworks Server Management database:


Information from MIB files is incorporated into the Novell ZENworks Server Management database by the MIB Compiler

During installation of Novell ZENworks Server Management, the MIB files that are precompiled using the MIB Compiler are also installed. The MIB for any SNMP node you want to manage must be compiled with Novell ZENworks Server Management. You can also integrate third-party MIBs. If you obtain a MIB file from a third-party vendor or any MIB file that was not installed with Novell ZENworks Server Management, you must compile the file using the MIB Compiler.


Using Role-Based Services with the MIB Compiler

Novell ZENworks Server Management role-based services let you assign various roles to users on your network. If your role is assigned the Enable MIB Compiler task, you can use the MIB Compiler.

See Role-Based Administration for more information about the role-based administration provided by Novell ZENworks Server Management.


Understanding the SNMP MIB Browser

The MIB Browser lets you manage SNMP-instrumented devices on the network.

To use this tool, you must have knowledge of SNMP and a good understanding of the structure of MIBs. Using the MIB Browser, you can manage nodes on the network by setting values of the MIB objects at the target nodes.

If you are familiar with the structure of an SNMP MIB, you can use the MIB Browser to retrieve data from SNMP-manageable node.

The MIB Browser lets you communicate with devices through an SNMP agent on the network over the User Datagram Protocol (UDP) or the Internet Protocol (IP). The results of SNMP commands are displayed in the MIB Browser window.

An SNMP agent is a program that provides access to management data about a particular network device and responds to SNMP Manager requests for the data. The NetWare® Management Agent software is an example of an SNMP agent that resides on a NetWare server. An SNMP agent resides in each manageable device on the network.

Although many Novell ZENworks Server Management windows display data retrieved from SNMP-manageable nodes, some administrators prefer the capability the MIB Browser provides for specifying the type of data they want to retrieve. Additionally, by using the MIB Browser, you can obtain some SNMP data that is not displayed in Novell ZENworks Server Management windows.

The MIB Browser takes the compiled MIB and displays the objects in a tree format. The MIB Browser also lets you walk the tree and look for the definitions of the selected MIB objects. You can set the community string to be used in the conversation between Novell ConsoleOne® and the SNMP-manageable node to manage the device.

The following figure demonstrates the functionality of the MIB Browser:


MIB Browser functionality

The MIB Browser does the following:

For more information on the MIB Browser, see Using the MIB Browser.


Using Role-Based Services with the MIB Browser

Novell ZENworks Server Management role-based services let you assign various roles to users on your network. If your role is assigned the Enable MIB Browser task, you can use the MIB Browser.

See Role-Based Administration for more information about the role-based administration provided by Novell ZENworks Server Management.


Managing Devices with MIB Tools

Novell ZENworks Server Management lets you manage any SNMP-manageable devices on the network. In particular, you can do the following:

Before using the MIB Browser to manage the devices, you need to perform the following tasks:

  1. Acquire the necessary MIBs.
  2. Add trap annotations, if required.
  3. Add or remove MIBs using the MIB Compiler.
  4. Run the MIB Compiler to compile the MIBs in Novell ZENworks Server Management.


ASN.1 and SNMP V2 Support

The MIB Compiler supports all MIB files written in ASN.1 and SNMP V1, V2 syntax. The MIB Compiler allows relaxation of ASN.1 syntax.


Trap Definitions

Some SNMP MIBs define the traps that a device can send to Novell ConsoleOne when an unusual event occurs on the network. When you compile a MIB containing traps, information about those traps is added to the Novell ZENworks Server Management alarm database. When Novell ZENworks Server Management receives a trap, the information in the alarm database is retrieved and used by Novell ZENworks Server Management to generate the alarm summary string and to determine the alarm type, alarm severity, state of the affected device, and other details.

You can improve the presentation of the alarm information in Novell ZENworks Server Management by adding annotations to the trap definitions in the MIB files. These annotations are added as comments to the trap definitions so that the MIB compiles with third-party MIB compilers.

All Novell® MIBs are annotated. If you choose not to annotate the traps in other MIBs, Novell ZENworks Server Management displays the alarms; however, they are less readable. SNMP MIBs use the TRAP-TYPE macro to define traps.

This section covers the following topics:


Keywords for Trap Definitions

The following table explains a trap definition.

Keyword Example Explanation

TRAP-TYPE

dupIpxNetAddr

Specifies the name of the trap. For example, dupIpxNetAddr represents a duplicated IPX network address.

ENTERPRISE

Novell NetWare-GA-alert-mib

Contains the OBJECT identifier of a node in the vendor's tree, which, together with the trap number (the 8 following the ::= in DESCRIPTION) uniquely identifies the trap.

VARIABLES

(osName, osLoc, tiTrapTime, tiEventValue, tiEventSeverity, tiServer)

Defines an ordered sequence of MIB objects that are passed as parameters of the trap to provide additional information about the event.

For example, osName is a text string specifying the name of the server sending the trap; osLOC is a text string specifying the location of the server; tiTrapTime is an integer specifying the time the event occurred.

DESCRIPTION

"Two servers use the same IPX Internet address."

Provides a textual description of the semantics of the trap.

Trap_number

: :=8

Defines the trap.


Template Database

The MIB Compiler populates the alarm template database with the trap definitions in the MIB files. Any traps from the agents are stored in the database.


Keywords for Trap Annotations

The following table lists and explains the keywords you can use to annotate traps:

Keyword Explanation

--#TYPE

Short name for the alarm. The name can contain a maximum of 40 characters. If this annotation is not present, the SNMP trap name is used. Every trap should have a unique type.

--#SUMMARY

Description of the alarm with placeholders and formatting information for the actual parameters passed with the alarm.

See Formatting the SUMMARY String for more information.

Without this annotation, the alarm summary string lists each SNMP parameter name followed by its value.

--#ARGUMENTS

List of parameters to substitute in the SUMMARY string. Parameters are substituted in the order in which they appear in the list. Each element of the list is the index (zero-based) of the parameter in the VARIABLES clause.

--#SEVERITY

Default severity assigned to the trap. This can be one of the following:

  • INFORMATIONAL
  • MINOR
  • MAJOR
  • CRITICAL
  • UNKNOWN

Without this annotation, the severity is displayed as UNKNOWN.

--#TIMEINDEX

Index of the variable in the VARIABLES clause. This index contains the time when the alarm was generated. The time is expected to be an integer representing the number of seconds since 1970 (UNIX* time). If such a variable does not exist in the VARIABLES clause, use an index greater than the total number of variables in the VARIABLE clause.

--#HELP

This index contains name of the help file.

--#HELPTAG

The index contains the reference to the Help ID of the help file that is specified in the HELP index.

--#STATE

Default state of the object when the alarm was generated. This can be one of the following:

  • OPERATIONAL
  • NONOPERATIONAL
  • DEGRADED
  • UNKNOWN

Without this annotation, the state is UNKNOWN.

Note the following rules about adding trap annotations:

  • Each annotation must be embedded in a comment. Everything from the double hyphen to the end of the line is treated as a comment.
  • Each annotation must be on a separate line.
  • Annotations must appear in the order in which they are discussed in Trap Definitions.
  • All annotations must be inserted after the DESCRIPTION clause and before the ::= clause.
  • STATE and SEVERITY values are written to the alarm database the first time the MIB is compiled. If you want to modify the STATE and SEVERITY values for the alarm templates, modify these values in the corresponding MIB files and recompile using the MIB compiler.


Example Trap Definitions

The following sections explain a trap description in an SNMP trap before and after annotation:


Example Trap Definition Before Annotation

dupIPXNetAddr TRAP-TYPE

ENTERPRISE Novell NetWare-GA-alert-mib

VARIABLES{osName, osLoc, tiTrapTime, tiEventValue, tiEventSeverity, tiServer}

DESCRIPTION"Two servers use the same IPX internetwork address."

::=8


Example Trap Definition After Annotation

dupIPXNetAddr TRAP-TYPE

ENTERPRISE Novell NetWare-GA-alert-mib

VARIABLES{osName, osLoc, tiTrapTime, tiEventValue, tiEventSeverity, tiServer}

DESCRIPTION"Two servers use the same IPX internetwork address."

-- Trap annotations are as follows:

--#TYPE "Duplicate IPX address"

--#SUMMARY "%s at %s and %s are using the same IPX address"

--#ARGUMENTS {0,1,5}

--#SEVERITY CRITICAL

--#TIMEINDEX 2

--#HELP "MYHELP.HLP"

--#HELPTAG 60004

--#STATE DEGRADED

::=8


Displaying Annotated Traps in Novell ZENworks Server Management

Assume that the dupIpxNetAddr trap shown in Keywords for Trap Definitions was received by Novell ZENworks Server Management with the following variables:

  • osName = SJM-JACK
  • osLoc = JACK's CORNER
  • tiTrapTime = ~700000000
  • tiServer = SJM-TIM

To display a trap, use the Active Alarm, Alarm History, or Alarm Detail window. The following example shows the result:

Receive Time:03/04/99 09:15:45

Alarm Type: Duplicate IPX address

Summary: SJM-JACK at JACK's Corner and SJM-TIM are using the same IPX address

Severity: Severe

State: Degraded


Formatting the SUMMARY String

The SUMMARY keyword in the trap annotation lets you provide the actual wording of the alarm summary. This wording is used by Novell ZENworks Server Management when the alarm occurs.

Placeholders within the string are replaced by actual parameters of the trap before the string is displayed by Novell ZENworks Server Management. Each placeholder format string begins with a percentage sign (%) and tells Novell ZENworks Server Management how to format the parameter that will be substituted for the placeholder in the final string.

The placeholder format strings are substituted, in order, by the parameters specified in the ARGUMENTS keyword. The ARGUMENTS keyword lists the (zero-based) index of each trap parameter as specified in the VARIABLES clause. The indexes are listed in the order in which you want them to be substituted in the SUMMARY string.

Novell ZENworks Server Management can display a maximum of 140 characters in the SUMMARY string. Use the characters to display the most relevant information about the alarm. If you have a long SUMMARY string and want to keep the line length of the MIB file reasonable, you can insert multiple, consecutive SUMMARY annotations and the strings will be concatenated. For example, the following annotations below yield the same string:

-#SUMMARY "%s at %s and %s are using the same"

-#SUMMARY "IPX address"

-#SUMMARY "%s at %s"

-#SUMMARY "and %s are"

-#SUMMARY "using the same IPX address"

The following table lists the format strings and parameter types.

Parameter Type Format String Printed Form

BOOLEAN

%s

%d

True or False.

1 or 0.

INTEGER

%x

%d

%t

HEX.

DECIMAL.

Prints the integer or a date and time (Greenwich Mean Time). The integer represents seconds since 1970.

OCTET STRING

%s

%m

%x

Prints the text string with all control characters taken out.

Prints the first 6 bytes of data as a hyphen-separated MAC address. For example, 00-00-07-00-07.

Prints the octet string in hexadecimal. For example, 0000070007.

NULL

%d

%s

Prints the number 0.

Prints the string NULL.

OBJECT IDENTIFIER

%s

Prints dot-separated decimal values. For example, 1.3.6.5.4.

IP Address

%s

%x

Prints dot-separated IP address. For example, 13.56.56.56.

Prints a long hexadecimal value.

BIT STRING

%s

Prints each byte as decimal.