Tuesday, November 24, 2026

Monitoring Oracle Autonomous Recovery Service Backups with OCI Monitoring and Events

I have been doing more work with Autonomous Recovery Service and one question that comes up is how to monitor the backups. It is easy to check the latest backup in the console, but that does not tell you everything you need to know about whether you can recover the database.



There are really two things I want to know. 

First  - Am I going to be able to successfully restore the database to any point in time if I had to? 

Second - Is there anything I need to address that may affect my ability to restore in the future?

I am going to show how to use OCI Monitoring to answer the first question and how to configure OCI Events to ensure continued recoverability.

1) Monitor the protection health of the database

Recovery Service exposes metrics in the oci_recovery_service namespace. The two I concentrate on are ProtectedDatabaseHealth and DataLossExposure.

MetricWhat I use it for
ProtectedDatabaseHealth0 = Protected, 1 = Warning, 2 = Alert.
DataLossExposurePotential data loss exposure, measured in seconds.
ProtectedDatabaseSizeDatabase size in GB; useful for capacity reporting.
SpaceUsedForRecoveryWindowStorage used to meet the recovery window in GB.

ProtectedDatabaseSize and SpaceUsedForRecoveryWindow are helpful to monitor space usage over time.

Let's start with ProtectedDatabaseHealth. 

A Protected value of 0 indicates that there are no issues with backups.  

A Warning value of 1 tells us there is potential data loss exposure. Warnings should be investigated and resolved to ensure continued backup protection.  Keep in mind that you may receive warnings if the database is down for maintenance.

An Alert value of 2 indicates a failure condition associated with multiple backups failing or the recovery window goal is missed. These need to be immediately addressed.

DataLossExposure can also be monitored if your RPO is critical and the default warning thresholds are too generous.  By default, the ProtectedDatabaseHealth will go into warning if  

  • Real-time redo is configured and the DataLossExposure goes beyond 10 seconds.
  • Real-time redo is NOT configured, and the DataLossExposure goes beyond 120 minutes.
NOTE: The DataLossExposure will grow if the Database is shutdown. Utilize  alarm suppression when performing planned maintenance. 

2) Create a Notifications topic

Before creating the alarm, create a Notifications topic to determine where the message should be delivered. In the OCI Console, go to Developer Services > Notifications, create a topic (for example, db_alerts_topic), and add a subscription. Email is a simple way to start; other protocols are available if you want to integrate with an incident-management platform.

Selecting the subscription protocol in OCI Notifications.

For email notifications, make sure the recipient confirms the subscription. Creating a topic alone does not guarantee the messages will be delivered.

NOTE: A function can be used to define API calls to external monitoring tools, ServiceNow for example.

3) Create an alarm for ProtectedDatabaseHealth

In the OCI Console, open Observability & Management > Monitoring > Alarm Definitions and select Create alarm. Give the alarm a name and description. In my example I used “Database Backup Health.”

Alarm definition and metric selection

Choose the compartment containing the protected databases, namespace oci_recovery_service, and metric ProtectedDatabaseHealth. The example uses a 30-minute interval and the Max statistic. Make sure the compartment and metric dimensions cover the databases you intend to monitor.

NOTE: These metrics are currently gathered every 15 minutes.  Setting a 30-minute interval ensures that you capture any alerts.  Setting the interval too aggressively may cause alerts to toggle between "reset" and "alert".

4) Use separate Warning and Critical trigger rules

Rather than make every issue the same severity, I prefer two rules. The first rule matches health value 1 and sends a Warning. The second matches value 2 and sends a Critical message. 

In order to better separate Warning from Critical, you can either:

  • Configure two alarms and filter for the exact value for Warning and Critical and have different subscriptions.
  • Send the alarm as a JSON message and have an external process interpret the message body.

The screenshot illustrates a one-minute trigger delay for each rule.

Both trigger rules 

This approach is useful because an operator can see the difference between a database that has potential exposure and one that has entered an Alert state. The exact trigger delay and notification grouping should reflect your operational requirements.

5) Connect the alarm to Notifications

Next, select the Notifications destination and the topic created earlier. Include useful context in the subject or body. I want an alert to identify the affected database and the severity without requiring the recipient to search for it.  There are variables you can use to customize the message.

Notifications, message format and alarm enablement 

You can choose the message format, whether to repeat notifications, and whether to suppress messages during a planned maintenance period. Enable the alarm and verify that it evaluates as expected.

Alarm status and history shown together for verification.

If you are monitoring many protected databases, consider split notifications per metric stream so the notification identifies the individual database rather than summarizing several databases in one grouped message.

6) Monitor failed backups with OCI Events

This is the part I think is often missed. A single failed incremental backup does not necessarily make the protection health turn to Warning immediately. I still want to know about it, even when Recovery Service continues to report that the database is protected.

OCI Events provides a way to watch for database operations. In the example from my presentation, I created an Events rule named Monitor for Failed Backups. The rule uses the Database – Automatic Backup End event and filters on the lifecycleState attribute with the value FAILED. The exact event payload and supported attributes should be validated for your database service before you rely on the rule.

Create rule and destination configuration 

As the action, choose Notifications and the topic you want to use for failed backup alerts. You can use a dedicated topic or the same topic as your protection-health alarm.

Events-rule Monitoring tab showing that a matching event was delivered.

After saving the rule, check its Monitoring tab to confirm that events are being delivered. Remember, a rule being enabled is not the same as confirming that the right events match and reach your intended destination.

7) Use the CLI when you need to check more than one database

For a few databases, the console works well. If you have many databases to monitor, I prefer retrieving the inventory with the OCI CLI and producing an exception report. For example:

oci recovery protected-database-collection list-protected-databases \
  --compartment-id <COMPARTMENT_OCID> --all
oci recovery protected-database get \
  --protected-database-id <PROTECTED_DATABASE_OCID>

You can then combine protected-database status with your backup history and scheduled-job expectations. The objective is to find the exceptions, not to spend every morning opening each database in the console.

Putting it all together

My recommendation is to start with the ProtectedDatabaseHealth alarm, add a separate Events rule to identify failed backups, and use DataLossExposure when investigating the potential impact of a transport interruption.

You should also periodically test restoring your databases. Being notified that a backup completed is important, but it is not the same as confirming that your recovery procedure works.

In the end, I do not want backup monitoring to answer only “did my last backup run?” I want it to help answer “can I recover the database when I need to?”

References