Restore uptodate status


Job details

Name: Restore uptodate status
Platform: Oracle
Category: Internal
Description: Checks size of all snapshot logs.
Long description:
Version: 1.1
Default schedule: 15m
Requires engine install: No
Compatibility tag: .[type=‘instance’ & databasetype=‘oracle’]

Parameters

Name Default value Description
dbWatch_schema dbwatch Schema where dbWatch is installed
return_status 1 Alarm or warning status if restore is older than configured parameter. 0=OK, 1=Warning, 2=Alarm
restore_max_time 192 Maximum time since last restored in hours. 168=one week

Job Summary

select round((sysdate-max(last_run))*24,0), to_char(max(last_run), 'YYYY-MM-DD HH24:MI:SS') from dbwatch.dbw_tasks;

Job Implementation

The monitoring job utilizes a SQL query to determine the duration since the last database restore and compares it with a predefined maximum acceptable time (‘restore_max_time’). If the period since the last restore exceeds the defined threshold, it changes the job’s status to either warning or alarm based on ‘return_status’. This facilitates real-time monitoring and quick response to potential issues.

Job Compatibility and Installation

The job is specifically designed for instances running an Oracle database management system where the dbWatch tasks table exists but without needing an active dbWatch engine. This makes it suitable for setups with specific configurations or in distributed database environments.

Job Output

The job’s primary output provides a status update and details about the last restore:


|_. Status |_. Details |
| OK | Database restored at: [date and time]. X hours ago. |
| Warning/Alarm | Database older than restore_max_time: X. Last restore: [date and time]. |

Job Scheduling

The job is configured to run every 15 minutes, ensuring frequent checks and updates on the database’s restore status, thereby maintaining a close watch on the critical timing aspect of database restores.

Reporting

The report template involves a detailed tabulation of restore statuses:

|_. Details | | Database restored at… X hours ago | | Database older than restore_max_time… Last restore… |

This formatted output helps in the visual representation and quick assessment of the database’s restore health in operational dashboards or review meetings.