Administration Console Online Help
[Attributes and Console Screen Reference for SNMP]
WebLogic Server software includes the ability to communicate with enterprise-wide management systems using Simple Network Management Protocol (SNMP). The WebLogic Server SNMP capability enables you to integrate management of WebLogic Servers into an SNMP-compliant management system. Such a system provides a single view of the various software and hardware resources of a complex, distributed system.
The following sections describe using SNMP with WebLogic Server:
For background information on the WebLogic SNMP agent and WebLogic SNMP traps, refer to the following sections:
To configure SNMP and WebLogic Server:
WL_HOME
\server\lib\
BEA-WEBLOGIC-MIB.asn1
, where WL_HOME
is the directory in which you installed WebLogic Server.For information about loading a MIB, refer to the documentation that the vendor of your SNMP management system supplies.
In a WebLogic domain, the Administration Server hosts the SNMP agent. After you enable and configure the SNMP agent functionality, SNMP managers can send requests to the WebLogic SNMP agent. In addition, the WebLogic SNMP agent can be configured to gather and send data (trap notifications) about managed resources to your SNMP manager (trap destination).
To enable and configure the SNMP agent:
Most SNMP managers can ping SNMP agents and some SNMP managers can request the status of specific attributes.
If an SNMP manager is running on the same computer as the Administration Server, make sure that the listen port you specify in this field and the listen port that you specify in the trap destination are different. (The trap destination's listen port specifies the port on which the SNMP manager listens for trap notifications.)
To secure access to the values of the WebLogic attributes, BEA Systems recommends that you use some value other than the default public
.
For more information about the community prefix, refer to "Using Community Names to Specify Target Servers in Management Requests."
A Trap Destination provides the information that the WebLogic SNMP agent needs to send trap notifications to an SNMP manager. For information about cloning or deleting a trap destination, refer to Cloning Configuration Objects and Deleting Configuration Objects.
Figure 351-1 Click on Trap Destinations
Make sure that the community name and port number match the name and number that your SNMP manager specifies, and that the host name correctly specifies the SNMP manager's host. For more information, refer to Attributes.
Figure 351-2 Click on the Name of the Domain
WebLogic Server provides information to your SNMP manager by monitoring server attributes and generating traps when the values change. WebLogic Server exposes these server attributes through Managed Beans (MBeans), which are part of the Java Management Extensions (JMX) specification. For more information, refer to "WebLogic Server Managed Resources and MBeans."
For any attribute that you want to monitor, you need the following information:
The following sections describe how to determine the values that you must supply to configure WebLogic Server to generate SNMP traps:
You can configure WebLogic Server to observe an attribute in all MBeans of a specific type or to observe an attribute of only a single instance of an MBean.
For example, you can create a monitor that observes the runtime state of all server instances in a domain. If the state of any server changes to a specific value (such as ShuttingDown
), the WebLogic SNMP agent generates a trap. The trap specifies the name of the server instance whose state has changed to ShuttingDown
.
Or, you can create a monitor that observes the heap size of a specific JVM that is running a specific server instance. If the heap size grows beyond a specified value, the WebLogic SNMP agent generates a trap. You could create one of these monitors for each server instance in a domain and specify a different threshold for each. For example, ServerA might run on a computer that has more physical memory than ServerB, so you need different thresholds for each server instance.
If you want to monitor an attribute in a specific MBean instance, you must know the name of the MBean instance. The following sections provide information on determining the names of MBean instances.
The following attributes are commonly monitored by SNMP and other management systems:
Indicates whether the server is in an If you want to use one monitor for multiple server instances, do not supply a value for MBean instance name. If any the state of any server changes, WebLogic Server generates a trap. |
|
MBean Type: |
Displays the number of threads in a server's default execute queue that are taking up memory space but are not being used to process data. You can create multiple execute queues on a server instance to optimize the performance of critical applications, but the |
MBean Type: |
Displays the number of requests waiting in a server's default execute queue. |
Displays the amount of memory (in bytes) that is currently available in the server's JVM heap. If you want to use one monitor for the heap size of multiple servers, do not supply a value for MBean instance name. If any server passes the threshold, WebLogic Server generates a trap. For more information, refer to "Tuning Java Virtual Machines (JVMs)." |
|
Use these two attributes together to compare the current activity on the server's listen ports to the total number of requests that can be backlogged on the ports. Note that the attributes are located in two separate MBeans: |
|
MBean Type: Attribute Name: MBean Instance Name: |
Displays the current number of active connections in a JDBC connection pool. If you want to use one monitor for all JDBC Connection Pools in a domain, do not supply a value for MBean instance name. For more information, refer to "How JDBC Connection Pools Enhance Performance." |
MBean Type: Attribute Name: MBean Instance Name: |
The high water mark of active connections in a JDBC connection pool. The count starts at zero each time the connection pool is instantiated. |
The number of times each servlet has been invoked. Use this attribute to generate a trap when any servlet has been invoked more than a specific number of times. For example, if any servlet is invoked more than 10,000 times, the WebLogic SNMP agent generates a trap that indicates which servlet has been invoked over the threshold. WebLogic Server does not support monitoring specific servlets. For example, you cannot create a monitor that generates a trap only when a servlet named |
Most, but not all, WebLogic Server attributes can be monitored through SNMP. The WebLogic Server MIB lists all attributes that can be monitored through SNMP.
To determine the name of any attribute that can be monitored through SNMP:
To determine the MBean type and attribute name:
Within the MIB, tables that include the word Runtime in their title expose attributes that describe a server's runtime state. All other tables expose attributes describe a server's configuration. The values of the configuration attributes are all saved in a domain's config.xml
file.
serverRuntimeTable
, the serverRuntimeState
entry corresponds to the State
attribute of the ServerRuntime
MBean, which indicates the current state of a server instance. serverTable
, the serverAcceptBacklog
entry corresponds to the AcceptBacklog
attribute of the Server
MBean, which is the total number of requests that can be backlogged on the server's ports.To determine the name of the MBean instance in which the attribute resides:
WL_HOME
\server\bin\setWLSEnv.cmd
(Windows)WL_HOME
/server/bin/setWLSEnv.sh
(UNIX)
where WL_HOME
is the directory in which you installed WebLogic Server.
java weblogic.Admin -adminurl
AdminHost:ListenPort
-username username
-password
password
GET -pretty -type MBean-type
-property
Attribute-Name
-adminurl
specifies the listen address and listen port of the domain's Administration Server.-username
and -password
specify the credentials of a user with administrative privileges.-type
specifies the MBean type that you determined in Commonly Monitored Attributes or Determining the Names of Other Attributes.-property
specifies the name of the MBean attribute that you want to monitor.For example, the following command returns the names of all JDBCConnectionPoolRuntime
MBeans that are currently instantiated in the domain:
java weblogic.Admin -adminurl localhost:7001
-username weblogic -password weblogic
GET -pretty -type JDBCConnectionPoolRuntime
-property ActiveConnectionsCurrentCount
This example command returns the following:
MBeanName: "MedRec:Location=MedRecServer,Name=MedRecPool,ServerRuntime=MedRecServer,Type=JDBCConnectionPoolRuntime"
A trap is the message (in a standard SNMP format) that WebLogic Server sends to the SNMP manager when an attribute changes in a specific way.
If you enable the SNMP service for a domain, the WebLogic SNMP agent automatically generates traps to notify an SNMP manager that a server instance has started. The WebLogic SNMP agent also automatically generates a trap if an SNMP manager sends an incorrect community string. For more information, refer to "Automatically Generated WebLogic SNMP Traps."
You can configure WebLogic Server to generate the following types of traps:
You can set up the WebLogic SNMP agent to listen for log messages that a server instance broadcasts. When the agent receives a message, it generates an SNMP log notification trap.
The SNMP Log Filter page displays. It lists all of the SNMP filters that you have created in the current domain.
For example, any time you change the configuration of a server instance, the server prints a log message with a message ID of BEA-140009
and severity INFO
. (You can see this message ID and severity level by changing a value in the Administration Console and then viewing the server's log file. For more information, refer to Viewing Server Logs.)
If you want WebLogic Server to generate a trap when a server instance prints this log message, in the Severity field enter INFO
, and in the Message ID field, enter BEA-140009
or 140009
.
Or, if you want the SNMP agent to receive all log messages from the Security Service, in the Severity field enter Info
, and in the Subsystem Names field enter Security
.
An Attribute Change detects a change in a configuration attribute and sends a trap to the configured SNMP managers.
Note: WebLogic Server does not support using Attribute Change trap notifications to monitor run-time attributes. Runtime MBeans always include the word Runtime
in their names. For example, the ServerRuntime
MBean provides access to runtime attributes while the Server
MBean provides access to configuration attributes. To monitor changes in an MBean that includes Runtime
in its name, use a String Monitor, Gauge Monitor, or Counter Monitor.
To detect changes in configuration attributes:
The SNMP Attribute Change page displays. This page lists all the counter monitors that are configured for the domain.
For example, if you want to monitor the AcceptBacklog
attribute of the Server
MBean for MedRecServer:
Server
.MedRecServer
.AcceptBacklog
.If you are configuring a monitor for a domain-wide resource, such as a JDBC Connection Pool, move the Administration Server to the Available column.
Note: When you assign an Attribute Change monitor to a server, you deploy a JMX listener and filter to the server. The listener will forward a notification to the WebLogic SNMP agent only if an event matches the criteria in the Attribute Change monitor.
A String Monitor periodically checks the value of a String
attribute and generates a trap if the value is equal to or different from another specified string.
To configure a string monitor:
The SNMP String Monitor page displays. This page lists all the string monitors that are configured for the domain.
For example, if you want to monitor the State
attribute of the ServerRuntime
MBean for MedRecServer:
Server Runtime
.MedRecServer
.State
.For testing purposes, consider entering a small value, such as 10
.
A value of 0
means that the monitor never polls the attribute, effectively disabling this monitor.
Running
, enter Running
in the String to Compare field and check the Notify Differ check box.If you are configuring a monitor for a domain-wide resource, such as a JDBC Connection Pool, select the Administration Server.
Note: When you assign a String Monitor to a server, you deploy a JMX listener and filter to the server. The listener will forward a notification to the WebLogic SNMP agent only if an event matches the criteria in the String Monitor.
For example, if you create a String Monitor that observes the State
attribute of ServerA's ServerRuntime
MBean, and if you target this monitor to ServerB, the monitor on ServerB will never generate a trap, because ServerB does not have access to the state of ServerA.
A gauge monitor periodically check the value of an integer or floating-point attribute and generate a trap if the value exceeds a threshold.
The SNMP Gauge Monitor page displays. This page lists all the gauge monitors that are configured for the domain.
For example, if you want to monitor the ActiveConnectionsHighCount
attribute of the JDBCConnectionPoolRuntime
MBean for a JDBC connection pool named MedRecPool:
JDBCConnectionPool Runtime
.MedRecPool
.ActiveConnectionsHighCount
.For testing purposes, consider entering a small value, such as 10
.
A value of 0
means that the monitor never polls the attribute, effectively disabling this monitor.
To send a trap when the observed attribute value is equal to or less than a specific value, enter the value in the Low Threshold field.
If you are configuring a monitor for a domain-wide resource, such as a JDBC Connection Pool, select the Administration Server.
Note: When you assign a Gauge Monitor to a server, you deploy a JMX listener and filter to the server. The listener will forward a notification to the WebLogic SNMP agent only if an event matches the criteria in the String Monitor.
For example, if you create a Gauge Monitor that observes the AcceptBacklog
attribute of ServerA's Server
MBean, and if you target this monitor to ServerB, the monitor on ServerB will never generate a trap, because ServerB does not have access to the configuration data of ServerA.
A counter monitor periodically checks the value of an integer attribute and generates a trap when the value exceeds a threshold. You can also configure a Counter Monitor to increase the threshold by an offset value after it sends a trap.
To configure a counter monitor:
The SNMP Counter Monitor page displays. This page lists all the counter monitors that are configured for the domain.
For example, if you want to monitor the ActiveConnectionsHighCount
attribute of the JDBCConnectionPoolRuntime
MBean for a JDBC connection pool name MedRecPool:
JDBCConnectionPool Runtime
.MedRecPool
.ActiveConnectionsHighCount
.For testing purposes, consider entering a small value, such as 10
.
A value of 0
means that the monitor never polls the attribute, effectively disabling this monitor.
If you are configuring a monitor for a domain-wide resource, such as a JDBC Connection Pool, select the Administration Server.
Note: When you assign a Counter Monitor to a server, you deploy a JMX listener and filter to the server. The listener will forward a notification to the WebLogic SNMP agent only if an event matches the criteria in the String Monitor.
For example, if you create a Counter Monitor that observes the AcceptBacklog
attribute of ServerA's Server
MBean, and if you target this monitor to ServerB, the monitor on ServerB will never generate a trap, because ServerB does not have access to the configuration data of ServerA.
The following list describes how to achieve typical configurations of a Counter Monitor instance by entering data on the Counter Monitor page:
Each time the observed attribute exceeds the new threshold, the threshold is increased by the offset value. For example, if you set Threshold
to 1000
and Offset
to 2000
, when the observed attribute exceeds 1000
, the Counter Monitor sends a notification and increases the threshold to 3000
. When the observed attribute exceeds 3000
, the Counter Monitor sends a notification and increases the threshold again to 5000
.
To specify a maximum value for the threshold, enter a value in the Modulus field. When the threshold reaches the value specified by the modulus, the threshold is returned to the value that was specified through the latest call to the monitor's setThreshold
method, before any offsets were applied. For example, if the original Threshold
is set to 1000
and the Modulus
is set to 5000
, when the Threshold
exceeds 5000
, the monitor sends a notification and resets the Threshold
to 1000
.
To disable the generation of SNMP traps, you must delete the trap configuration:
The WebLogic SNMP agent can act as a proxy for other SNMP agents. It listens for requests from SNMP managers. If any of the OIDs in the requests fall under the control a proxy that you have defined, WebLogic Server forwards the request to the SNMP agent that is associated with the proxy. For more information, refer to "SNMP Proxies."
Note: You cannot use the WebLogic SNMP agent as a proxy for SNMP agents in other WebLogic Server domains. For example, WebLogic domainA's SNMP agent cannot proxy requests to domainB's SNMP agent. This limitation is in effect because all WebLogic SNMP agents use the same MIB root.
Instead of proxying requests to multiple WebLogic Server domains, you can place all of your server instances in a single domain and send requests directly to each Managed Server. See Using Community Names to Specify Target Servers in Management Requests.
Use the following tasks to configure WebLogic Server to act as a proxy for an SNMP agent: