Oracle Cloud Infrastructure Documentation

Enabling Monitoring for Compute Instances

This topic describes how to enable monitoring for Compute instances that use supported images.

Warning

Avoid entering confidential information when assigning descriptions, tags, or friendly names to your cloud resources through the Oracle Cloud Infrastructure Console, API, or CLI.

Except for Compute instances, all resources that support the Monitoring service emit metrics by default. A Compute instance using a supported image emits metrics when it has the required instance configuration and OracleCloudAgent software.

Supported Images

Prerequisites

  • Service gateways or public IP addresses: The Compute instances must have either service gateways or public IP addresses to send metrics to the Monitoring service.
  • IAM policies: To create and update Compute instances, you must be given the required type of access in a An IAM document that specifies who has what type of access to your resources. It is used in different ways: to mean an individual statement written in the policy language; to mean a collection of statements in a single, named "policy" document (which has an Oracle Cloud ID (OCID) assigned to it); and to mean the overall body of policies your organization uses to control access to resources. written by an administrator, whether you're using the Console or the REST API with an SDK, CLI, or other tool. If you try to perform an action and get a message that you don’t have permission or are unauthorized, confirm with your administrator the type of access you've been granted and which A collection of related resources that can be accessed only by certain groups that have been given permission by an administrator in your organization. you should work in. For more information, see Creating an Instance.
  • SSH: To connect to a Compute instance, you must have an SSH key. For more information, see Connecting to an Instance.

Process Overview: Enabling Monitoring for a New Compute Instance

Following is the process for configuring a new Compute instance to emit metrics.

Task 1: Create a monitoring-enabled instance
Task 2: (Optional) Create a service gateway

Find Out if Monitoring Has Your Metrics

To find out if Monitoring has your metrics

Process Overview: Enabling Monitoring for an Existing Compute Instance

Following is the process for configuring an existing Compute instance to emit metrics.

Task 1: Enable monitoring
Task 2: Install the OracleCloudAgent software
Task 3: (Optional) Create a service gateway

Using the Console

Use the Console to create a Compute instance with monitoring enabled and, for new instances using legacy images, to run the script that installs the required OracleCloudAgent software.

To create a monitoring-enabled instance
To find out if monitoring is enabled or if Monitoring is receiving metrics
To enable monitoring on an existing instance

Using the API

Use the API to enable monitoring on a new or existing instance. After monitoring is enabled, you can install the OracleCloudAgent software.

For information about using the API and signing requests, see REST APIs and Security Credentials. For information about SDKs, see Software Development Kits and Command Line Interface.

To create a monitoring-enabled instance
To find out if monitoring is enabled or if Monitoring is receiving metrics
To enable monitoring on an existing instance