The ActiveSessionMonitor generates an alert when the sum of active Oracle sessions exceeds a threshold for some number of consecutive samples. This task is particularly useful for detecting problems with web applications when database sessions stop executing requests in a timely manner, causing an increased number of active sessions.
The <ActiveSessionMonitorConfig> element is configured with the following attributes:
||Defines the Active Sessions threshold. When the number of active sessions detected is greater than MAX_SESSIONS the internal sample counter is incremented.
||Defines the Samples threshold. An alert is generated when MAX_SESSIONS is exceeded for a number of consecutive SAMPLES.
||Specifies whether any SQL statements currently being executed by active sessions are returned in the log file. When more than 'n' (defined by STATEMENT_THRESHOLD) active sessions are executing the same SQL statement, the SQL statement is included in the alert attachment.
In this example, TCAgent generates an alert it detects more than forty active sessions during three consecutive task executions. Identical SQL statements being executed by more than five active sessions are included in the alert attachment.