Administration Console Online Help

 Previous Next Contents Index  

Configuring SNMP and WebLogic Server

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:

 


Configuring SNMP and WebLogic Server: Main Steps

To configure SNMP and WebLogic Server:

  1. In your SNMP management system, load the WebLogic MIB. WebLogic Server installs its MIB as 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.

  2. Start the Administration Server for your domain.

  3. Enable and configure the WebLogic SNMP agent. For more information, refer to Enabling and Configuring the WebLogic SNMP Agent.

  4. If you want WebLogic Server to monitor some of its attributes and send traps to SNMP managers when the attribute values change, do the following:

    1. Configure an SNMP trap destination. For more information, refer to Creating a Trap Destination.

    2. Determine the names of the WebLogic Server attributes that you want to monitor. For more information, refer to Determining Which WebLogic Server Attributes to Monitor.

    3. Configure WebLogic Server to generate one or more traps. For more information, refer to Configuring WebLogic Server to Generate Traps.

 


Enabling and Configuring the WebLogic SNMP Agent

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:

  1. In the WebLogic Server Administration Console, in the left pane, expand the Services folder. Then click on the name of the SNMP folder.

  2. In the right pane, on the SNMP tab, check the Enabled box.

  3. At a minimum, make the following changes to the default values:

    1. In the SNMP Port field, enter the port number on which the WebLogic SNMP agent listens for requests from SNMP managers.

      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.)

    2. In the Community Prefix field, enter the SNMP community (password) that SNMP managers must specify when sending requests to the WebLogic SNMP agent.

      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."

  4. Modify any of the default values for the remainder of attributes. For information about these attributes, refer to Attributes.

  5. Click Apply.

  6. Restart the Administration Server.

 


Creating a Trap Destination

A Trap Destination provides the information that the WebLogic SNMP agent needs to send trap notifications to an SNMP manager.

To create a Trap Destination:

  1. In the Administration Console, in the left pane, expand the Services folder. Then expand the SNMP folder.

  2. Click on the name of the Trap Destinations folder.

  3. In the right pane, click the Configure a new SNMP Trap Destination link.

  4. On the Create a new SNMPTrapDestination page, enter values in the attribute fields.

    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.

  5. Click the Create button.

  6. In the left pane, click on the name of the domain.

  7. In the right pane, click the Configuration tab. Then click the SNMP tab.

  8. On the SNMP tab, in Targeted Trap Destinations, move the Trap Destination that you created from the Available to the Chosen column. Then click Apply.

  9. Restart the Administration Server.

 


Determining Which WebLogic Server Attributes to Monitor

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:

Determining the Scope of an SNMP Monitor

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.

Commonly Monitored Attributes

The following attributes are commonly monitored by SNMP and other management systems:

Table 86-1 Commonly Monitored WebLogic Server Attributes

Name

Description

MBean Type: ServerRuntime

Attribute Name: State

MBean Instance Name: server-name
For example, MedRecServer

Indicates whether the server is in an Initializing, Suspended, Running, or ShuttingDown state.

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: ExecuteQueueRuntime

Attribute Name: ExecuteThreadCurrentIdleCount

MBean Instance Name: default

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 default execute queue is available by default. For more information, refer to "Using Execute Queues to Control Thread Usage."

MBean Type:ExecuteQueueRuntime

Attribute Name: PendingRequestCurrentCount

MBean Instance Name: default

Displays the number of requests waiting in a server's default execute queue.

MBean Type: ServerRuntime

Attribute Name: OpenSocketsCurrentCount

MBean instance name: server-name
For example, MedRecServer

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:

  • OpenSocketsCurrentCount is in the ServerRuntime MBean.

  • AcceptBacklog is in the Server configuration MBean.

MBean Type: Server

Attribute Name: AcceptBacklog

MBean Instance Name: server-name
For example, MedRecServer

MBean Type: JDBCConnectonPoolRuntime

Attribute Name: ActiveConnectionsCurrentCount

MBean Instance Name: connection-pool-name
For example, MedRecPool

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 "Tuning WebLogic Server."

MBean Type: JDBCConnectonPoolRuntime

Attribute Name: ActiveConnectionsHighCount

MBean Instance Name: connection-pool-name
For example, MedRecPool

The high water mark of active connections in a JDBC connection pool. The count starts at zero each time the connection pool is instantiated.

MBean Type: ServletRuntime

Attribute Name: InvocationTotalCount

MBean Instance Name: null (do not specify a value)

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 MyServlet is invoked beyond a threshold.


 

Determining the Names of Other Attributes

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:

  1. Determine the name of the MBean type and attribute name. For more information, refer to Determining the MBean Type and Attribute Name.

  2. If you want to monitor a specific instance of an MBean, determine the name of the MBean instance that exposes the attribute you want to monitor. For more information, refer to Determining the Name of the MBean Instance.

Determining the MBean Type and Attribute Name

To determine the MBean type and attribute name:

  1. Browse through the WebLogic Server MIB Reference until you find an attribute that you want to monitor.

    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.

  2. To determine the corresponding MBean type and attribute name:

    1. Determine the name of the MIB table in which the entry resides.

    2. Remove any spaces and the word "table" from the table title to determine the name of the corresponding MBean type.

    3. Remove the name of the table from the entry to determine the name of the MBean attribute.

    For example:

Determining the Name of the MBean Instance

To determine the name of the MBean instance in which the attribute resides:

  1. In a command prompt, run the following script:

    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.

  2. Enter the following command:

    java weblogic.Admin -url ServerHost:ListenPort
    -username
    username -password password
    GET -pretty -type
    MBean-type -property Attribute-Name

    where:

    For example, the following command returns the names of all JDBCConnectionPoolRuntime MBeans that are currently instantiated in the domain:

    java weblogic.Admin -url localhost:7001
    -username weblogic -password weblogic
    GET -pretty -type JDBCConnectionPoolRuntime
    -property ActiveConnectionsCurrentCount

    This example command returns the following:

    MBeanName: "mydomain:Location=MyServer,Name=MyPool,ServerRuntime=MyServer,Type=JDBCConnectionPoolRuntime"

    ActiveConnectionsCurrentCount: 1

  3. Review the output of the weblogic.Admin command. The output provides the name of the MBean instance as Name=name.

    In the previous example, the name of the JDBCConnectionPoolRuntime MBean is MyPool.

 


Configuring WebLogic Server to Generate Traps

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:

Table 86-2 Types of Traps

Configure This Type...

When You Want To...

For More Information, Refer To

Notification Log Filter

Generate a trap when a server instance prints a specific log message.

Configuring a Notification Log Filter

Attribute Change

Generate a trap when an attribute in a configuration MBean is changed.

WebLogic Server provides two types of MBeans:

  • Configuration MBeans, which contain static configuration data that changes only when you issue a command through the Administration Console, the weblogic.Admin utility, or an API.

  • Runtime MBeans, which contain dynamic information about an attribute's runtime state.

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.

WebLogic Server does not support using Attribute Change trap notifications to monitor runtime attributes. Instead, use a String Monitor, Gauge Monitor, or Counter Monitor.

Configuring an Attribute Change

String Monitor

Periodically check the value of a String attribute and generate a trap if the value is equal to or different from another specified string.

This monitor type can monitor both configuration and runtime MBeans.

Configuring a String Monitor

Gauge Monitor

Periodically check the value of an integer or floating-point attribute and generate a trap if the value exceeds a threshold.

This monitor type can monitor both configuration and runtime MBeans.

Configuring a Gauge Monitor

Counter Monitor

Periodically check the value of an integer attribute and generate 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.

This monitor type can monitor both configuration and runtime MBeans.

Configuring a Counter Monitor


 

Configuring a Notification Log Filter

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.

  1. In the left pane of the Administration Console, expand the following folders: Services—>SNMP—>Traps. Then click on the name of the Log Filters folder.

    The SNMP Log Filter page displays. It lists all of the SNMP filters that you have created in the current domain.

  2. In the right pane, on the SNMP Log Filter page, click the Configure a new Log Filter link.

  3. On the Create a new SNMP Log Filter page, enter values in the fields:

    For example, if you want the SNMP agent to receive only log messages from the Security Service, in the Severity field enter Info, and in the Subsystem Names field enter Security.

  4. Assign the filter to the server instances from which you want to receive messages.

    The Enabled Servers, Available list contains all server instances that have been defined for the domain. Move the server instances from which you want to receive messages to the Chosen list.

  5. Click the Create button to create and register the log filter.

  6. Restart the Administration Server so that your changes can take effect.

Configuring an Attribute Change

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:

  1. In the Administration Console, in the left pane, expand the following folders: Services—>SNMP—>Traps. Then click on the name of the Attribute Changes folder.

    The SNMP Attribute Change page displays. This page lists all the counter monitors that are configured for the domain.

  2. On the SNMP Attribute Change page, select the Configure a new Attribute Change link.

  3. On the Create a new SNMP Attribute Change page, enter a name for the attribute change in the Name field.

    BEA Systems recommends that you choose a name that indicates the resource that is being monitored.

  4. Enter values in the Attribute MBean Type, Attribute MBean Name, and Attribute Name fields. For more information, refer to Determining Which WebLogic Server Attributes to Monitor.

    For example, if you want to monitor the AcceptBacklog attribute of the Server MBean for MyServer:

    The new instance is added under the String Monitors node in the left pane.

  5. Next to Enabled Servers move the servers on which the MBean or MBeans are located from the Chosen to the Available column.

    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.

  6. Click the Create button.

    The new instance is added under the Attribute Changes node in the left pane.

  7. Restart the Administration Server so that your changes can take effect.

Configuring a String 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:

  1. In the Administration Console, in the left pane, expand the following folders: Services—>SNMP—>Traps. Then click on the name of the String Monitors folder.

    The SNMP String Monitor page displays. This page lists all the string monitors that are configured for the domain.

  2. On the SNMP String Monitor page, select the Create a new String Monitor link.

  3. On the String Monitor page, enter a name for the monitor instance in the Name field.

    BEA Systems recommends that you choose a name that indicates the resource that is being monitored.

  4. Enter values in the Monitored MBean Type, Monitored Attribute Name, and (optionally) Monitored MBean Name fields. For more information, refer to Determining Which WebLogic Server Attributes to Monitor.

    For example, if you want to monitor the State attribute of the ServerRuntime MBean for MedRecServer:

  5. In the Polling Interval field, enter the frequency in seconds at which you want WebLogic Server to check the attribute's value.

    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.

  6. In the String to Compare field, enter a string.

  7. To send a trap when the observed attribute value differs from the string, select Notify Differ. For example, if you want to be notified when a server's life cycle state is anything other than Running, enter Running in the String to Compare field and check the Notify Differ check box.

    To send a trap when the observed attribute value matches the string, select Notify Match.

  8. Click Create.

    The new instance is added under the String Monitors node in the left pane.

  9. Click the Servers tab and move the servers on which the MBean or MBeans are located to the Chosen column.

    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.

  10. Click Apply.

  11. Restart the Administration Server.

Configuring a Gauge Monitor

A gauge monitor periodically check the value of an integer or floating-point attribute and generate a trap if the value exceeds a threshold.

To configure a gauge monitor:

  1. In the Administration Console, in the left pane, expand the following folders: Services—>SNMP—>Traps. Then click on the name of the Gauge Monitors folder.

    The SNMP Gauge Monitor page displays. This page lists all the gauge monitors that are configured for the domain.

  2. On the SNMP Gauge Monitor page, select the Create a new Gauge Monitor link.

  3. On the Gauge Monitor page, enter a name for the monitor instance in the Name field.

    BEA Systems recommends that you choose a name that indicates the resource that is being monitored.

  4. Enter values in the Monitored MBean Type, Monitored Attribute Name, and (optionally) Monitored MBean Name fields. For more information, refer to Determining Which WebLogic Server Attributes to Monitor.

    For example, if you want to monitor the ActiveConnectionsHighCount attribute of the JDBCConnectionPoolRuntime MBean for a JDBC connection pool named MyPool:

  5. In the Polling Interval field, enter the frequency in seconds at which you want WebLogic Server to check the attribute's value.

    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.

  6. To send a trap when the observed attribute value is equal to or greater than a specific value, enter the value in the High Threshold field.

    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.

  7. Click Create.

    The new instance is added under the Gauge Monitors node in the left pane.

  8. Click the Servers tab and move the servers that you want to enable for trap generation to the Chosen column.

    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.

  9. Click Apply.

  10. Restart the Administration Server.

Configuring a Counter Monitor

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:

  1. In the Administration Console, in the left pane, expand the following folders: Services—>SNMP—>Traps. Then click on the name of the Counter Monitors folder.

    The SNMP Counter Monitor page displays. This page lists all the counter monitors that are configured for the domain.

  2. On the SNMP Counter Monitor page, select the Create a new Counter Monitor link.

  3. On the Counter Monitor page, enter a name for the monitor instance in the Name field.

    BEA Systems recommends that you choose a name that indicates the resource that is being monitored.

  4. Enter values in the Monitored MBean Type, Monitored Attribute Name, and (optionally) Monitored MBean Name fields. For more information, refer to Determining Which WebLogic Server Attributes to Monitor.

    For example, if you want to monitor the ActiveConnectionsHighCount attribute of the JDBCConnectionPoolRuntime MBean for a JDBC connection pool name MyPool:

  5. In the Polling Interval field, enter the frequency in seconds at which you want WebLogic Server to check the attribute's value.

    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.

  6. Enter data in the remaining fields as described in the next section, "Typical Configurations for Counter Monitors."

  7. Click Create.

    The new instance is added under the Counter Monitors node in the left pane.

  8. Click the Servers tab and move the servers that you want to enable for trap generation to the Chosen column.

    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.

  9. Click Apply.

  10. Restart the Administration Server.

Typical Configurations for Counter Monitors

The following list describes how to achieve typical configurations of a Counter Monitor instance by entering data on the Counter Monitor page:

 


Disabling Trap Generation

To disable the generation of Log Filter and Attribute Change traps, you must delete the trap configuration.

To disable the generation of String Monitor, Gauge Monitor, or Counter Monitor traps, you can either delete the trap or you can set its polling rate to 0.

To delete a trap configuration:

  1. In the Administration Console, in the left pane, expand the following folders: Services—>SNMP—>Traps. Then click on the name of the folder that contains the trap.

    For example, to delete an Attribute Change trap configuration, expand Services—>SNMP—>Traps. Then click on the name of the Attribute Changes folder.

  2. In the right pane, in the table that lists the traps that you have configured, click the delete icon in the table row that represents the trap configuration.

To prevent a String Monitor, Gauge Monitor, or Counter Monitor trap from being generated without deleting the trap configuration:

  1. In the Administration Console, in the left pane, expand the following folders: Services—>SNMP—>Traps—>Monitors. Then expand the folder that contains the trap.

  2. Click on the trap configuration.

  3. In the right pane, on the General tab, in the Polling Interval field, enter 0.

  4. Restart the Administration Server.

 


Configuring an SNMP Proxy

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:

  1. In the Administration Console, in the left pane, expand the following folders: Services—>SNMP. Then click on the name of the Proxies folder.

  2. In the right pane, click the Configure a new Proxy text link.

  3. On the Create a new SNMPProxy page, enter values in the attribute fields. For more information, refer to Attributes.

  4. Click Apply to create the new proxy.

  5. Restart the Administration Server.

 

Back to Top Previous Next