Setting Up Contextual Notifications for an Instance
You can get messages when something happens with a compute instance. Use contextual notifications to create event rules and alarms for an instance. Quick start templates are available.
For background information about notifications, see notification (Notifications Concepts).
Required IAM Policy
To set up contextual notifications for an instance, use the following policy.
allow group ContextualNotificationsUsers to manage alarms in tenancy allow group ContextualNotificationsUsers to read metrics in tenancy allow group ContextualNotificationsUsers to manage ons-topics in tenancy allow group ContextualNotificationsUsers to manage cloudevents-rules in tenancy
If you're new to policies, see Getting Started with Policies and Common Policies. For reference material about writing policies for instances, cloud networks, or other Core Services API resources, see Details for the Core Services.
- Open the navigation menu and click Compute. Under Compute, click Instances.
- Click the instance that you're interested in.
Click the Notifications tab.
When no notifications exist for the instance, the Notifications tab lists quick start templates.
An example quick start template allows you to set up notifications for high CPU usage.
- Click the quick start template that you want.
In the Create Notification panel, scroll down to Topics and Subscriptions.
A new topic is automatically set up for you to add contact information to.
- Contact Information: Add at least one entry for where you want to receive messages.
Modify the default settings listed above Topic and Subscriptions.
For example, change the event type or alarm severity.
Click Create Notification.
Messages are sent to the contact information entries whenever the condition of the notification is satisfied.