作者: ecsun 链接: http://papa.javaeye.com/blog/226519 发表时间: 2008年08月11日
声明:本文系JavaEye网站发布的原创博客文章,未经作者书面许可,严禁任何网站转载本文,否则必将追究法律责任!
The following sections define an SNMP-compliant MIB and introduce the SNMP MIB for BEA SNMP Agent 2.1 and BEA SNMP Agent 2.1.1:
* What Is an SNMP-Compliant MIB?
* MIB Information Structure
* MIB Object Identifiers
* SNMP MIB for BEA SNMP Agent
* SNMP MIB Component MIBs
* SNMP MIB Object Naming Conventions
* SNMP MIB Object Definitions
* SNMP MIB Event Trap Definitions
* Using the SNMP MIB
* Understanding the Differences Between the SNMP MIB and the TMIB
What Is an SNMP-Compliant MIB?
Each management station or agent in an SNMP-managed network maintains a local database of information relevant to network management, known as the management information base (MIB). The relationship between the management station, the agent, and the MIB is shown in the following figure.
Figure 1-1 SNMP-Managed Configuration
An SNMP-compliant MIB contains definitions and information about the properties of managed resources and the services that the agents support. The manageable features of resources, as defined in an SNMP-compliant MIB, are called managed objects or management variables (or just objects or variables).
A management station gets and sets objects in the MIB, and an agent notifies the management station of significant but unsolicited events called traps. All message exchanges between the management station and its agents take place using the Simple Network Management Protocol (SNMP).
The MIB at the management station contains network management information extracted from the MIBs of all the managed entities in the network.
MIB Information Structure
The structure of management information (SMI), an SNMP standard described in the NWG RFC 1155, defines the structure of the MIB information and the allowable data types. The SMI identifies how resources within the MIB are represented and named. The philosophy behind SMI is to encourage simplicity and extensibility within the MIB.
The SNMP specification includes a template, known as an Abstract Syntax Notation One (ASN.1) OBJECT TYPE macro, which provides the formal model for defining objects and tables of objects in the MIB. The following keywords are used to define a MIB object:
Syntax
Defines the abstract data structure corresponding to the object type. The SMI purposely restricts the ASN.1 constructs that can be used to promote simplicity.
Access
Defines whether the object value may only be retrieved but not modified (read-only) or whether it may also be modified (read-write).
Description
Contains a textual definition of the object type. The definition provides all semantic definitions necessary for interpretation; it typically contains information of the sort that would be communicated in any ASN.1 commentary annotations associated with the object.
MIB Object Identifiers
Each object in the MIB has an object identifier (OID), which the management station uses to request the object's value from the agent. An OID is a sequence of integers that uniquely identifies a managed object by defining a path to that object through a tree-like structure called the OID tree or registration tree. When an SNMP agent needs to access a specific managed object, it traverses the OID tree to find the object. The MIB object identifier hierarchy and format is shown in the following figure.
Figure 1-2 SNMP MIB Object Identifier Hierarchy and Format
In this hierarchy, each BEA private MIB object that the BEA SNMP Agent software manages has a unique object identifier. A prefix of .1.3.6.1.4.1.140 points to the objects in the BEA private MIB for the BEA SNMP Agent software.
Absolute and Relative Object Identifiers
Absolute OIDs specify a path to an attribute from the root of the OID tree. Absolute OID names always begin with a dot and must specify every node of the OID tree from the top-most node to the specific managed object. For example:
.1.3.6.1.2.1.1.1
Relative OIDs specify a path to the attribute relative to some node in the OID tree. For example, 2.1.1.1 specifies the sysDescr object in the system group, relative to the Internet node in the OID tree.
Specifying Object Identifiers
In addition to using the "dot-dot" notation, a series of integers separated by dots to describe OIDs, you can also express OIDs by using textual symbols instead of numbers to represent nodes in the path to the object, or by using a combination of both integers and textual symbols. A symbolic OID uses mnemonic keywords to specify the managed object. For example:
mgmt.mib-2.system.sysContact
The following numeric OID uses integers to specify the same managed object:
2.1.1.7
Note that 2.1.1.7 in this example is a relative OID.
An OID can combine both symbolic and numeric representations of individual nodes of the OID tree; for example:
mgmt.mib-2.1.sysContact
SNMP MIB for BEA SNMP Agent
The SNMP MIB for BEA SNMP Agent 2.1 and BEA SNMP Agent 2.1.1 is essentially an SNMP version of the Tuxedo management information base (TMIB). The TMIB is the standard MIB for administering the components of a Tuxedo or WebLogic Enterprise application. For more information about the TMIB, see Understanding the Differences Between the SNMP MIB and the TMIB.
The SNMP MIB defines the data types and access permissions for the various managed objects that can be accessed through the BEA SNMP Agent software. It also defines the event notifications that can be generated by the BEA SNMP Agent software. As required by the SNMP standard, the SNMP MIB definitions are written in concise MIB format in accordance with RFC 1212.
BEA SNMP Agent 2.1 and BEA SNMP Agent 2.1.1 both provide a file named bea.asn1 for defining the SNMP MIB. By default, the bea.asn1 file resides in the etc directory directly under the directory in which the BEA SNMP Agent software is installed.
SNMP MIB for BEA SNMP Agent 2.1
The bea.asn1 file available with BEA SNMP Agent 2.1 defines the SNMP MIB referred to as the "Tuxedo and WLE MIB for SNMP." This MIB, which is a translation of the Tuxedo 7.1 MIB with WebLogic Enterprise 5.1 extensions, makes the features of the following components recognizable and thus manageable within an SNMP network management framework:
* Tuxedo 6.4 components
* Tuxedo 6.5 components
* Tuxedo 7.1 components
* WLE 4.2 components
* WLE 5.1 components
You use the "Tuxedo and WLE MIB for SNMP" and BEA SNMP Agent 2.1 to manage Tuxedo 6.4, Tuxedo 6.5, Tuxedo 7.1, WebLogic Enterprise 4.2, and WebLogic Enterprise 5.1 applications.
SNMP MIB for BEA SNMP Agent 2.1.1
The bea.asn1 file available with BEA SNMP Agent 2.1.1 defines the SNMP MIB referred to as the "Tuxedo 8.0 MIB for SNMP." This MIB, which is a translation of the Tuxedo 8.0 MIB, makes the features of the Tuxedo 8.0 components recognizable and thus manageable within an SNMP network management framework.
You use the "Tuxedo 8.0 MIB for SNMP" and BEA SNMP Agent 2.1.1 to manage Tuxedo 8.0 applications. Since BEA SNMP Agent 2.1.1 is not backward compatible, you can only use the BEA SNMP Agent 2.1.1 software to manage Tuxedo 8.0 applications.
SNMP MIB Component MIBs
The SNMP MIB defined by the bea.asn1 file for BEA SNMP Agent 2.1 or BEA SNMP Agent 2.1.1 refers to the entire database of management information at the management station or agent. The SNMP MIB, itself, consists of distinct component MIBs, each of which refers to a specific defined collection of management information that is part of the overall SNMP MIB. The management station uses the component MIBs to administer the particular components of the Tuxedo or WebLogic Enterprise system, to administer the agents themselves, and to collect information about the managed resources.
The SNMP MIB consists of the following component MIBs:
* Core MIB—OID prefix: .1.3.6.1.4.1.140.300 (or tuxedo)—Contains the MIB objects for controlling the operation and configuration of a Tuxedo or WebLogic Enterprise application. This MIB contains the main information groups for Tuxedo and WebLogic Enterprise applications, including domains, machines, queues, servers, routing, clients, and services. For a detailed description, see Core MIB.
* Domains MIB—OID prefix: .1.3.6.1.4.1.140.300 (or tuxedo)—Contains the MIB objects for describing the interaction between Tuxedo or WebLogic Enterprise applications (domains). For a detailed description, see Domains MIB.
* BEA Domain List MIB—OID prefix: .1.3.6.1.4.1.140.305 (or beaDomainList)—Contains the MIB objects for identifying and describing all Tuxedo and/or WebLogic Enterprise domains currently being monitored on a particular managed node (machine). For a detailed description, see BEA Domain List MIB.
* CORBA and Java Interface MIB—OID prefix: .1.3.6.1.4.1.140.300 (or tuxedo)—Contains the MIB objects for managing Tuxedo 8.0 and WebLogic Enterprise CORBA features as well as WebLogic Enterprise Java features. For a detailed description, see CORBA and Java Interface MIB.
* Access Control List MIB—OID prefix: .1.3.6.1.4.1.140.300 (or tuxedo)—Contains the MIB objects for setting and controlling the security options for the Tuxedo or WebLogic Enterprise application. For a detailed description, see Access Control List MIB.
* Workstation MIB—OID prefix: .1.3.6.1.4.1.140.300 (or tuxedo)—Contains the MIB objects for specifying information about Tuxedo or WebLogic Enterprise client workstations including workstation listeners and handlers. For a detailed description, see Workstation MIB.
* Application Queue MIB—OID prefix: .1.3.6.1.4.1.140.300 (or tuxedo)—Contains the MIB objects for managing access to Tuxedo or WebLogic Enterprise application queues. The groups include objects for managing queue spaces, queues, messages, and transactions. For a detailed description, see Application Queue MIB.
* EventBroker MIB—OID prefix: .1.3.6.1.4.1.140.300 (or tuxedo)—Contains the MIB objects for describing current event subscriptions, defining new subscriptions, or invalidating subscriptions. For a detailed description, see EventBroker MIB.
* Traps MIB—OID prefix: .1.3.6.1.4.1.140.300 (or tuxedo)—Contains the MIB objects for specifying the trap notifications generated by the SNMP agent for BEA SNMP Agent, and for specifying the objects passed in the variable bindings for the traps. For a detailed description, see Traps MIB.
* BEA System MIB—OID prefix: .1.3.6.1.4.1.140.1 (or beaSystem)—Contains the MIB objects for passing the trap notifications generated by the BEA SNMP Agent Integrator polling rules. As an example, a rule-action might specify that when the value of the polled object at OID .1.3.6.1.4.1.140.1.0 is greater than 20, send a trap with a specific trap ID of 200; when the object's value becomes less than 20, send a trap with a specific Trap ID of 300. For a description of the BEA SNMP Agent Integrator polling feature, see "Using the BEA SNMP Agent Integrator for Polling" in the BEA SNMP Agent Administration Guide.
* BEA Agent Integrator MIB—OID prefix: .1.3.6.1.4.1.140.200 (or beaIntAgt)—Contains the MIB objects for creating user-defined traps that are generated by the BEA SNMP Agent Integrator according to user-defined polling rules. You can configure the BEA SNMP Agent Integrator running on the managed node to perform local polling and generate SNMP trap notifications, or execute a system command when certain conditions are met. Individual rules, stored as MIB objects, can be activated and deactivated by the management station. For a description of polling rules, see "Configuration Files" in the BEA SNMP Agent Administration Guide.
With the exception of BEA Domain List, Traps, BEA System, and BEA Agent Integrator, the SNMP MIB component MIBs correspond to the TMIB component MIBs. For more information about the TMIB, see Understanding the Differences Between the SNMP MIB and the TMIB.
SNMP MIB Object Naming Conventions
Because most Tuxedo managed objects also apply to WebLogic Enterprise, the object names for Tuxedo and WebLogic Enterprise within an SNMP MIB are usually prefixed with the letters tux. For example, the Core MIB contains a group named Machine, and the following objects are included within the Machine group:
tuxTmachinePmid
Represents a physical machine identifier
tuxTmachineLmid
Represents the logical machine identifier
For CORBA interface MIB managed objects, the object names for Tuxedo 8.0 are prefixed with tux, and the comparable object names for WebLogic Enterprise are prefixed with wle. For Java interface MIB managed objects, which only apply to WebLogic Enterprise, the object names are prefixed with wle.
SNMP MIB Object Definitions
The SNMP MIB definitions are written in concise MIB format in accordance with RFC 1212. Thus, the SNMP MIB stores only simple data types: scalars and two-dimensional arrays of scalars, called tables. Keywords SYNTAX, ACCESS, and DESCRIPTION as well as other keywords such as STATUS and INDEX are used to define the SNMP MIB managed objects.
To monitor or modify values of managed objects through your management station, you need to know which MIB objects represent the features of the Tuxedo or WebLogic Enterprise resources that are relevant to your management goals. You also need to know the data types, default values, and access permissions for these MIB objects.
For table objects, keep the following tips in mind:
* In some cases a read-write table object can only be set during creation of a new row. Where true, this information is noted in the DESCRIPTION section for that object.
* Each row in a table is an instance of the Entry object under that table. The DESCRIPTION section for the Entry object under a table (such as tuxTmachineTable) contains information on the columnar values that are minimally necessary for creation of a row—how a new row is created, whether the values pertain only to the local machine, and other pertinent information about the table objects.
SNMP MIB Event Trap Definitions
The bea.asn1 file defines a full range of Tuxedo and WebLogic Enterprise system and application events in accordance with RFC 1215, Trap definitions. These system and application events are transmitted as enterprise-specific traps to the management station. For a list of these traps, see Traps MIB.
The following keywords are used to define a trap:
ENTERPRISE
An object identifier that specifies the management enterprise under whose registration authority this trap is defined. All traps generated by the SNMP agent for BEA SNMP Agent have an enterprise field set to the following OID: .1.3.6.1.4.1.140.300. This value is passed in the enterprise field of the trap packet (Protocol Data Unit—PDU).
VARIABLES
Defines the ordered sequence of MIB objects that are contained in each instance of the trap type. Each variable is placed, in order, inside the variable-bindings field of the SNMP trap packet (PDU).
DESCRIPTION
Contains a textual definition of the trap type.
Trap ID
Specifies the enterprise-specific trap ID for the trap definition. The trap ID is passed in the specific trap ID field of the trap packet (PDU). The value of the generic trap ID field in traps is always set to 6, indicating an enterprise-specific trap.
Using the SNMP MIB
The management station uses the bea.asn1 file to set up the SNMP MIB for BEA SNMP Agent on the management station. The bea.asn1 file must be imported into the management database of the management station, as described in "Using the BEA SNMP Agent with a Management Framework" in the BEA SNMP Agent Administration Guide.
The SNMP agent for BEA SNMP Agent uses a file named mib.txt to set up its local SNMP MIB on the managed node (machine). The mib.txt file, similar to the bea.asn1 file, provides a textual description of the content of the SNMP MIB. By default, the mib.txt file resides in the etc directory directly under the directory in which the BEA SNMP Agent software is installed. For more information about using the mib.txt file to create the local SNMP MIB on a managed node, see "BEA SNMP Agent Integrator Commands" in the BEA SNMP Agent Administration Guide.
The SNMP agent communicates with the TMIB of the managed Tuxedo or WebLogic Enterprise application to get the object values that initially populate the local SNMP MIB. As the management station gets and sets object values in the local SNMP MIB through the SNMP agent, the SNMP agent issues Tuxedo/WLE commands to read and write the comparable object values in the local TMIB.
The local SNMP MIB is not persistent, meaning that the SNMP MIB is not written to disk. When the SNMP agent process terminates, its SNMP MIB also terminates.
Querying Non-Existent MIB Objects
If you attempt to retrieve the value for an SNMP MIB object that does not exist, either no value is returned, or one of the following values is returned:
* -1 if the object is numeric
* A dash (-) if the object data type is DisplayString
For example, if a WebLogic Enterprise application is not installed on the managed node, the WLE-specific objects included in the "Tuxedo and WLE MIB for SNMP" do not return values when queried.
Updating MIB Objects
Some objects in the SNMP MIB can be set (updated) only under certain states of the Tuxedo or WebLogic Enterprise system. If you get an error while trying to set read-write objects in this MIB, examine the Tuxedo or WebLogic Enterprise ULOG file for more information about the error.
The Tuxedo or WebLogic Enterprise system creates a new ULOG file each day on each machine in a Tuxedo/WLE domain. For a description of the ULOG file, see the reference page userlog(3c).
Understanding the Differences Between the SNMP MIB and the TMIB
The primary difference between the SNMP MIB for BEA SNMP Agent and the Tuxedo MIB (TMIB) is the use of terms. In addition, the SNMP MIB contains a few additional component MIBs.
The TMIB for a Tuxedo or WebLogic Enterprise system consists of distinct component MIBs, each used to administer a particular component of the Tuxedo or WebLogic Enterprise system. These component MIBs are defined in individual reference pages each addressing the MIB for a particular part of the system. For example, the reference page TM_MIB(5) defines the MIB used to administer the fundamental aspects of a BEA Tuxedo 8.0 application. TM_MIB is comparable to the SNMP Core MIB.
Instead of referring to groups and managed objects, as is common in SNMP terminology, the TMIB defines application resources as classes and attributes. Classes are the administrative class definitions that make up the TMIB. Each class has a set of attributes that identifies individual items in the class. Examples of TMIB classes are:
T_MACHINE
The class definition for a machine
T_SERVICE
The class definition for Tuxedo services
Attributes for these classes are identified by the prefix TA_ followed by the attribute name. A few examples for the T_MACHINE class are:
TA_PMID
Represents a physical machine name
TA_LMID
Represents the logical machine name
For more information about the TMIB, visit any of the following Web sites:
* http://e-docs.bea.com/tuxedo/tux71/html/rf5.htm
* http://e-docs.bea.com/tuxedo/tux80/atmi/rf5.htm
* http://e-docs.bea.com/wle/tuxedo/refman/sect5/index.htm
* http://e-docs.bea.com/wle/ref/mibs.htm#1035002
已有 0 人发表留言,猛击->>这里<<-参与讨论
JavaEye推荐
- 辉煌盛会-微软WinHec 2008 邀您共赴卓越
- 搜狐网站诚聘Java、PHP和C++工程师