RowCountMonitor

Task Type: Database Monitor
Configurable: Yes
Host Dependent: No
Schedule Dependent: No

Description

The RowCountMonitor generates an alert when the result from a query returning a count is above or below a threshold.

Configuration

The <RowCountMonitorConfig> element must contain one or more <Statement> elements configured with the following attributes:

Attribute Required Description
SQL Yes A valid SQL query that returns a single integer value.
THRESHOLD Yes A value to which the result of the query is compared to determine if an alert is sent.
COMPARATOR Yes Specifies how the SQL query result is compared to the threshold. The value provided must be one of the following:

GT - An alert is sent when the result returned by the SQL statement is greater than the threshold.
GTE - An alert is sent when the result returned by the SQL statement is greater than or equal to the threshold.
LT - An alert is sent when the result returned by the SQL statement is less than the threshold.
LTE - An alert is sent when the result returned by the SQL statement is less than or equal to the threshold.
EQ - An alert is sent when the result returned by the SQL statement is equal to the threshold.
ALERT_TYPE Yes Specifies the type of alert sent when the defined THRESHOLD is reached.

Example

<RowCountMonitorConfig>
  <Statement SQL="select count(*) from PRODU.MLOG$_ORDERS"
             THRESHOLD="1000"
             COMPARATOR="GT"
             ALERT_TYPE="REPLICATION_ERROR"/>
</RowCountMonitorConfig>

In this example, TCAgent sends a REPLICATION_ERROR alert when the query "select count(*) from PRODU.MLOG$_ORDERS" returns a result greater than 1000.

Usage Notes

  • TCMonitor must be granted any permissions required to execute the provided SQL statement.
  • The RowCountMonitor can be used to monitor Oracle Replication environments. Monitor row counts in MLOG$ tables to make sure that replication processes are running properly.
Your Source for Oracle Expertise