Gauge Monitor Archive

WebLogic SNMP to monitor JDBC Connection Pool

Configuring WebLogic SNMP to monitor JBDC Connection Pool attributes using Gauge Monitor.

SNMP: It is basically Internet Protocol used to manage the devices over the IP based Network. The devices could be servers ,routers, printers, switches etc.

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 below article demonstrates of how to configure a simple SNMP Gauge monitor to monitor the JDBC Connection pool attribute “ActiveConnectionsHighCount”  value within a specified range and generate the SNMP traps accordingly.

For example, we can check whether the  ActiveConnectionsHighCount of the Connection Pool operates within a range of Max and Min threshold values and generate trap notifications accordingly.

The steps are as below.

1. Creating SNMP agent.

2. Creating SNMP Gauge Monitor

3. Creating SNMP Trap Destination.

4. Verifying the SNMP Alerts.

1. Creating SNMP Agent:

a. Login into the Administration Console, navigate to Diagnostics → SNMP.

Click on New tab to create a Server SNMP Agent

b. Click on the newly created SNMP Agent → Enable the SNMP agent and you can modify the default SNMP agent attributes like SNMP ports etc.

c.Target the SNMP Agent to the Managed Server MS1.

2. Creating SNMP Gauge Monitor:

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.

There are other different Monitors that can be set along side Gauge Monitor.

String Monitor:  A string monitor observes changes in attributes that are expressed as String Objects.

For further reference on the same refer the below post.

a.Click on Gauge Monitor tab from the console.

b. From the drop down list of Mbeans, select  ‘JDBCConnectionPoolRuntime‘ Mbean

c. Select the ActiveConnectionsHighCount attribute from the drop down list.

d. Enter the threshold values for Max and Min number to specify the range for ActiveConnectionsHighCount attribute.

e. Click on the newly created Gauge Monitor and specify which DataSource Mbean you want to monitor (DS), polling interval of the MBeans.

f. Target the created Counter Monitor to the Managed server MS1.

3. Creating SNMP Trap Destination:

a. Click SNMP Agent –>  Trap Destinations –>  New.

b. Specify the Trap Destination attributes like Host and Ports.

4. Verify the SNMP Traps:

To verify that a WebLogic Server SNMP Agent is generating and sending notifications, we can use the WebLogic command line utility SnmpTrapMonitor.

a. Open a command prompt and set the classpath to the weblogic.jar file under the %WLS_HOME%/lib folder.

set classpath=%classpath%;%WLS_HOME%\server\lib\weblogic.jar

b. Run the weblogic command line utility weblogic.diagnostics.snmp.cmdline.Manager SnmpTrapMonitor to receive notifications.

Make sure that you specify the same listen port for this Trap Monitor as the trap destination that you created for the SNMP Agent.

For example, if your trap destination specifies a listen port of 171, enter the following command: java

java weblogic.diagnostics.snmp.cmdline.Manager SnmpTrapMonitor -p 171

The SNMP setup is complete. The config.xml file would like below.







<monitored-m-bean-name>JDBC Data Source-0</monitored-m-bean-name>








If the ActiveConnectionsHighCount value exceeds / falls below the threshold values of the DataSource Connection Pool would generate Traps on to the listener as below.

From the command line utility:


java weblogic.diagnostics.snmp.cmdline.Manager SnmpTrapMonitor -p 171

RawTrapOID     :
Trap Objects   : {
{ enterprises.140.625.100.5=Sun Dec 19 20:52:36 IST 2010 }
{ enterprises.140.625.100.10=MS1 }
{ enterprises.140.625.100.55=jmx.monitor.gauge.low }
{ enterprises.140.625.100.60=2 }
{ enterprises.140.625.100.65=0 }
{ enterprises.140.625.100.70=com.bea:Name=JDBC Data Source-0,ServerRuntime=MS
1,Type=JDBCConnectionPoolRuntime }
{ enterprises.140.625.100.75=JDBCConnectionPoolRuntime }
{ enterprises.140.625.100.80=ActiveConnectionsHighCount }

From the Managed server console or server logs.

<Notice> <SNMP> <BEA-320931> <The SNMP trap version is 1>

For further references:

Best Regards,

Wonders Team. 🙂