3 Understanding WebLogic Server Notifications

You can configure a WebLogic Server SNMP agent to detect certain thresholds or conditions within a managed resource and send a report (notification) to one or more SNMP managers. WebLogic Server SNMP agents can generate notifications that conform to the SNMPv1, SNMPv2, or SNMPv3 protocols.

The following sections describe the notifications that WebLogic Server SNMP agents can generate:

To configure or delete WebLogic Server notifications, refer to "Use SNMP to monitor WebLogic Server" in the Oracle Fusion Middleware Oracle WebLogic Server Administration Console Help.

INFORM Notifications and TRAP Notifications

An SNMP agent that uses the SNMPv2 or SNMPv3 protocol can send one of two types of notifications when a monitored attribute crosses a defined threshold:

  • TRAP. The agent sends a TRAP notification once and assumes that the SNMP manager received the message.

  • INFORM. The agent sends an INFORM notification and waits for a response from the SNMP manager that indicates the manager has received the message. If the manager does not respond, the agent resends the notification.

By default, a WebLogic Server SNMP agent sends TRAP notifications. For information on configuring an SNMP agent to send INFORM notifications, see "Configure INFORM Notifications" in the Oracle Fusion Middleware Oracle WebLogic Server Administration Console Help.

Automatically Generated Notifications

WebLogic Server SNMP agents can automatically generate the notifications described in Table 3-1. Some of these notifications include name–value pairs (variable bindings) to further describe the event.

Table 3-1 Automatically Generated Notifications

Notification Generated When Variable Bindings

coldStart

The WebLogic Server instance that hosts the SNMP agent starts.

none

serverStart

A WebLogic Server instance that was down is now up.

An SNMP agent on a Managed Server generates this notification only when its host Managed Server starts. An SNMP agent on an Administration Server generates this notification when any server in the domain starts.

Contains two name–value pairs to identify server start time and the server name.

serverShutDown

A server that was up is now down.

An SNMP agent on a Managed Server generates this notification only when its host Managed Server stops. An SNMP agent on an Administration Server generates this notification when any server in the domain stops.

Contains two name–value pairs to identify server down time and the server name.


Log Message Notifications

Subsystems and deployable modules (such as applications) on a WebLogic Server instance generate log messages to communicate status or other operational data.

Each server instance saves these messages in a local log file and then broadcasts them as JMX notifications. You can set up a WebLogic Server SNMP agent to listen for all of these JMX notifications or you can set up a filter based on criteria such as:

  • Message severity level

  • Name of the subsystem that generated the message

  • User ID under which the subsystem is running

  • Unique message ID

  • String within the message text

For example, you can specify that only messages from the Security Service of severity level ERROR or higher are sent to an SNMP agent. For information on setting up an SNMP agent to listen for messages, refer to "Create SNMP Log Filters" in the Oracle Fusion Middleware Oracle WebLogic Server Administration Console Help .

When an agent receives a message, it generates an SNMP log notification. (See Figure 3-1.)

Figure 3-1 Log Message Notifications

Description of Figure 3-1 follows
Description of "Figure 3-1 Log Message Notifications"

Variable Bindings in Log Message Notifications

This section describes the name–value pairs that log message notifications pass to SNMP managers in the variable bindings field:

  • trapTime: Time the notification is generated.

  • trapServerName: Name of the server instance on which the log message was generated.

  • trapMachineName: Name of the machine on which the server instance is running.

  • trapLogThreadId: Thread ID from the log message.

  • trapLogTransactionId: Transaction ID, if any, from the log message. Transaction ID is present only for messages logged within the context of a transaction.

  • trapLogUserId: User ID from the log message. The user ID indicates the security context in which the log message was generated.

  • trapLogSubsystem: Subsystem that generated the log message.

  • trapLogMsgId: Log message ID from the log message.

  • trapLogSeverity: Message severity level from the log message.

  • trapLogMessage: Text of the log message.

For more information on log messages and the WebLogic Server logging subsystem, refer to "Understanding WebLogic Logging Services" in Oracle Fusion Middleware Configuring Log Files and Filtering Log Messages for Oracle WebLogic Server.

Monitor Notifications

To periodically check the value of WebLogic resources for changes, you set up JMX monitors and configure an SNMP agent to listen for notifications from these monitors.

JMX is a Java EE specification for exposing management data; it is the foundation for the WebLogic Server management system. In the JMX specification, management data and operations are made public through managed beans (MBeans). The managed objects in the WebLogic Server MIB correspond to MBeans and MBean attributes. See Relationship of the MIB Module to the WebLogic Server MBean Data Model.

JMX monitors poll WebLogic Server MBeans at a specified interval and send notifications to an WebLogic SNMP agent when an event that you specify occurs, such as the crossing of a threshold. The SNMP agent generates a notification and sends it to the SNMP managers. (See Figure 3-2.)

Figure 3-2 Monitor Notifications

Description of Figure 3-2 follows
Description of "Figure 3-2 Monitor Notifications"

You can configure three types of JMX monitors depending on the data type of the attribute that you want to observe (the Oracle Fusion Middleware Oracle WebLogic Server MBean Reference describes the type of data that an attribute returns):

  • Counter Monitor

    A counter monitor observes MBean attribute values that are returned as an Integer object type.

    You can specify that a notification is generated if an attribute is beyond the bounds of a threshold value. You can also specify that if a value exceeds a threshold, the monitor increases the threshold by an offset value. Each time the observed attribute exceeds the new threshold, the threshold is increased by the offset value, up to a maximum allowable threshold that you specify.

    For information on configuring a counter monitor, refer to "Create counter monitors" in the Oracle Fusion Middleware Oracle WebLogic Server Administration Console Help.

  • Gauge Monitor

    A gauge monitor observes changes in MBean attributes that are expressed as integers or floating-point.

    You can specify that a notification is generated if an attribute is beyond the bounds of a high or low threshold value.

    For information on configuring a gauge monitor, refer to "Create gauge monitors" in the Oracle Fusion Middleware Oracle WebLogic Server Administration Console Help.

  • String Monitor

    A string monitor observes changes in attributes that are expressed as String objects.

    You can specify that a notification is generated if there is a match between the value and the string you provide, or you can specify that the notification is generated if the value differs from the string you provide.

    For information on configuring a string monitor, refer to "Create string monitors" in the Oracle Fusion Middleware Oracle WebLogic Server Administration Console Help.

Variable Bindings in Monitor Notifications

A JMX monitor polls for a specified threshold or condition and the agent generates a monitor notification when the specified threshold is crossed or the specified condition occurs. A WebLogic Server SNMP agent includes the following name–value pairs in the variable bindings of each monitor notification:

  • trapTime: Time at which the notification was generated.

  • trapServerName: Local server whose attribute value generated the notification.

  • trapMonitorType: Either CounterMonitor, StringMonitor, or GaugeMonitor.

  • trapMonitorThreshold: ASCII representation of the threshold that triggered the notification.

  • trapMonitorValue: ASCII representation of the value that triggered the notification.

  • trapMBeanName: Name of the MBean that contained the attribute being monitored.

  • trapMBeanType: Type of the MBean that contained the attribute being monitored.

  • trapAttributeName: Name of the attribute whose value triggered the notification.

Attribute Change Notifications

While you can use JMX monitors to periodically poll WebLogic Server resources for changes to attributes that exceed the bounds of specific thresholds, you can also configure an SNMP agent to send a notification immediately after an attribute is changed in any way. For example, you can use a JMX monitor to poll for changes in the current number of active JDBC connections. If the number of active connections exceeds a threshold, the SNMP agent can send a notification.

For information on configuring an SNMP agent to send attribute change notifications, refer to "Create attribute changes" in the Oracle Fusion Middleware Oracle WebLogic Server Administration Console Help.

Note:

Creation of attribute changes for runtime MBeans is not supported. Only attributes of configuration MBeans support attribute change notifications.

Variable Bindings in Attribute Change Notifications

An attribute change notification includes the following name–value pairs in the variable bindings:

  • trapTime: The time at which the notification was generated.

  • trapServerName: The name of the Administration Server.

  • trapMBeanName: Name of the MBean that includes the attribute.

  • trapMBeanType: Type of the MBean that includes the attribute.

  • trapAttributeName: Name of the configuration attribute that has changed.

  • trapAttributeChangeType: The value can be either ADD, REMOVE, or UPDATE.

  • trapAttriruteOldVal: Value of the attribute before the change.

  • trapAttributeNewVal: Value of the attribute after the change.

OIDs for WebLogic Server Notifications

The object identifier (OID) for all WebLogic Server notifications start with the WebLogic Server OID: .1.3.6.1.4.140.625

Table 3-2 describes the next value in OIDs for WebLogic Server notifications.

Table 3-2 OIDs for WebLogic Server Notifications

Value Generated When

60

A server instance logs a message that matches user-defined criteria for sending a log notification.

For example, .1.3.6.1.4.140.625.60

65

A WebLogic Server instance that was down is now up.

An SNMP agent on a Managed Server generates this notification only when its host Managed Server starts. An SNMP agent on an Administration Server generates this notification when any server in the domain starts.

This is called a serverStart notification.

For example, .1.3.6.1.4.140.625.65

70

A server that was up is now down.

An SNMP agent on a Managed Server generates this notification only when its host Managed Server stops. An SNMP agent on an Administration Server generates this notification when any server in the domain stops.

This is called a serverShutDown notification.

For example, .1.3.6.1.4.140.625.70

75

A user-defined JMX monitor detects the crossing of a threshold or occurrence of an event.

For example, .1.3.6.1.4.140.625.75

80

An attribute selected by the user has changed in value.

For example, .1.3.6.1.4.140.625.80


Some notifications also include variable bindings. To see the OIDs for the variable bindings, refer to BEA-WEBLOGIC-MIB.asn1.zip.