LongSqlMonitor
Task Type: |
Database Monitor |
Configurable: |
Yes |
Host Dependent: |
No |
Schedule Dependent: |
Yes |
Description
The LongSqlMonitor monitors the database for active sessions executing sql statements whose execution time exceeds a configurable threshold.
Configuration
The <LongSqlMonitor> may contain one <Default> element, which defines a default threshold. The <Default> element is configured with the following attribute:
Attribute |
Required |
Description |
THRESHOLD |
Yes |
A threshold value expressed in seconds. TCAgent generates an alert when it detects a SQL statement running longer than the specified threshold. The value for this attribute must be a positive integer. |
The default threshold may be overridden by using one or more <User> elements, which are configured with the following attributes:
Attribute |
Required |
Description |
NAME |
Yes |
Specifies a username that will be monitored using an individual threshold or will be excluded from monitoring altogether. |
THRESHOLD |
Depends |
A threshold value expressed in seconds. TCAgent generates an alert when it detects a SQL statement executed by the named user running longer than the specified threshold. This attribute is required when the EXCLUDE attribute is set to "NO" or is omitted. |
EXCLUDE |
No |
May be used to indicate that the named user is excluded from monitoring. Valid values are "YES" and "NO". |
Example
<LongSqlMonitor>
<Default THRESHOLD="5"/>
<User NAME="JSMITH" THRESHOLD="10"/>
</LongSqlMonitor>
In this example, TCAgent sends an when any JSMITH session runs a SQL statement that takes longer than 10 minutes to complete, or when any other session runs a SQL statement that takes longer than 5 minutes to complete.