Using Events to Notify When a Volume Backup Fails
You can use Oracle Cloud Infrastructure Events to track the status of Block Volume backup operations. See Block Volume Backup Event Types for a list of these event types. Block Volume event types include a status attribute you can use to trigger actions based on the result of the backup operation. The status attribute value is either operationFailed or operationSucceed.
This topic describes how to create a rule in the Console that triggers an action when the backup operation fails for a volume.
You need to manually type the operationFailed and operationSucceed attribute values into the text box when creating a rule in the Console.
For more information about Events, see the following topics:
Prerequisites
Before you can create a rule that triggers an action when a volume backup operation fails, you should ensure that you have the completed the prerequisites outlined in Prerequisites for Creating Rules.
You should also review the information in Setting Up for Events, particularly:
- Create IAM Policy for Events
- Create Notifications Topic and Subscription
Using the Console
- Open the navigation menu and click Observability & Management. Under Events Service, click Rules.
- Choose a Compartment you have permission to work in, and then click Create
Rule.
Events compares the rules you create in this compartment to event messages emitted from resources in this compartment and any child compartments.
- Enter the following.
- Display Name: Specify a friendly name for the rule. You can change this name later. Avoid entering confidential information.
- Description: Specify a description of what the rule does. You can change this description later.
- In Rule Conditions, create a filter that triggers when a volume backup
operation completes with operationFailed for the status attribute. To add the volume backup create ends event type
- Select Event Type from Condition.
- Select Service Name from Service Name.
- In Event Type, select Create Volume Backup End.
To add the status attribute
- After adding an event type, click + Another Condition.
- Select Attribute from Condition.
- Select status for Attribute Name.
- Type operationFailed for Attribute Values.
This filter matches Create Volume Backup End events where the status attribute is operationFailed, indicating that the backup operation did not complete successfully.
- In Actions, specify the actions resources to trigger when the filter finds a match. Select the action resource appropriate for what you configured for Events in Prerequisites. For more information, see Prerequisites for Creating Rules and Setting Up for Events.
To select a topic
- Select Notifications.
- Select the Notifications Compartment.
- Select the Topic.
- Click + Another Action and select Notifications to add another topic.
To select a stream- Select Streaming.
- Select the Stream Compartment.
- Select the Stream.
- Click + Another Action and select Streaming to add another stream.
To select a function- Select Functions.
- Select the Function Compartment.
- Select a Function Application.
- Select the Function.
- Click + Another Action and select Functions to add another function.
- Click Create Rule.