Quantcast
Channel: THWACK: All Content - All Communities
Viewing all articles
Browse latest Browse all 20518

Custom Alert - Oracle Database Percent Growth

$
0
0

Description

This alert works in conjunction with the "Oracle Collect Database Size" alert (collector), i.e. the collector alert needs to be in place before this alert can be configured. The collector alert retrieves the space used data from the Oracle instance being monitored and stores in into Ignite alert tables. This alert retrieves that data and calculates a percent growth from the last two collections.

 

Alert Definition

Create a Custom Alert of type Custom SQL Alert - Single Numeric Return and make it look similar to the screenshot below.

 

Alert Name: Oracle Database Percent Growth

Execution Interval: 1 Hour

Notification Text: The following list of SQL statements had 200% (twice as many) executions as they normally do.

Available Instances:Only choose Oracle instances as this alert will only work against Oracle instances.

 

SQL Statement:  Warning: Depending on your Ignite Repository DB type (Oracle vs SQL Server) choose the proper query below:


SQL Server Repository:

Custom Alert - SQL Server Database Growth



Oracle Ignite Repository

WITH latest_rows AS

(

   SELECT ROW_NUMBER() OVER (ORDER BY ah.actiondate DESC) row_num, to_number(replace(ah.levelvalue,',','')) db_size_mb

   FROM con_alert a

   INNER JOIN con_alert_history ah ON ah.alertid=a.id

   WHERE a.alertname='Collect Database Size - Oracle'

   AND ah.dbname = (select name from cond where id=#DBID#)

)

SELECT 100*(d1.db_size_mb - d2.db_size_mb) / d1.db_size_mb pct_growth

FROM (SELECT db_size_mb FROM latest_rows WHERE row_num = 1) d1,

     (SELECT db_size_mb FROM latest_rows WHERE row_num = 2) d2

 

Execute Against: Repository

Units: % Growth

High Threshold: Min 10, Max empty

Medium Threshold: Min 5, Max 10


Viewing all articles
Browse latest Browse all 20518

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>