6.12 CLRConnectionPools

Use this Knowledge Script to monitor SQL connection pools in managedĀ .NET applications. Connection pools are caches of stored database connections that are reused, eliminating the need to create new connections each time a new request is received.

This script raises an event if either of the following conditions exists:

  • The highest number of pooled connections in a session exceeds a specified threshold.

  • The total number of connection attempts that failed exceeds a specified threshold.

NOTE:The monitored .NET applications must be running at the time of discovery so their resource objects can be discovered. The applications must also be running for this script to collect data.

6.12.1 Default Schedule

The default schedule for this script is Every 5 minutes.

6.12.2 Resource Objects

SQL Client Managed Applications folder

SQL Client Managed Applications object

6.12.3 Setting Parameter Values

Set the following parameters as needed:

Parameter

How to Set It

General Settings

Raise event if the managed application is not running?

Set to Yes to raise an event if the managed application is not running. The default is Yes.

Event severity when application is not running

Set the event severity level, from 1 to 40, to indicate the importance of an event in which the managed application is not running. The default is 20 (yellow event indicator).

Monitor Peak Pooled Connection

Event Notification

Raise event if peak pooled connections exceed threshold?

Set to Yes to raise an event if the number of pooled connections exceeds the threshold you set. The default is Yes.

Threshold - Threshold - Maximum peak pooled connections

Specify the maximum number of pooled connections that can occur before an event is raised. The default is 64 connections.

Event severity when peak pooled connections exceed threshold

Set the event severity level, from 1 to 40, to indicate the importance of an event in which the number of pooled connections exceeds the threshold. The default is 15 (yellow event indicator).

Data Collection

Collect data for peak pool connection?

Set to Yes to collect data for charts and reports. When enabled, data collection returns the maximum number of pool connections that occurred during the monitoring interval. The default is unselected.

Monitor Failed Connection

Event Notification

Raise event if failed connections exceed threshold?

Set to Yes to raise an event if the number of failed connections exceeds the threshold you set. The default is Yes.

Threshold - Maximum failed connections

Specify the maximum of connections that can fail before an event is raised. The default is 4 connections.

Event severity when failed connections exceed threshold

Set the event severity level, from 1 to 40, to indicate the importance of an event in which the number of failed connections exceeds the threshold. The default is 15 (yellow event indicator).

Data Collection

Collect data for failed connections?

Set to Yes to collect data for charts and reports. When enabled, data collection returns the number of connections that failed during the monitoring interval. The default is unselected.

Monitor General Connection Pool

Data Collection

Collect data for current connection pool?

Set to Yes to collect data for charts and reports. When enabled, data collection returns the number of current connection pools. The default is unselected.

Collect data for pooled connections?

Set to Yes to collect data for charts and reports. When enabled, data collection returns the number of pooled connections. The default is unselected.