Updated 2025-01-07

Scenario: Archiving Logs to Object Storage

Archive log data to a bucket in Object Storage.

This scenario involves creating a connector. The connector  processes and moves log data from Logging to Object Storage.

Required IAM Policy

If you're a member of the Administrators group, you already have the required access to execute this scenario. Otherwise, you need access to Monitoring, Notifications, and Object Storage.

The workflow for creating the connector includes a default policy when needed to provide permission for writing to the target service. If you're new to policies, see Getting Started with Policies and Common Policies.

Setting Up This Scenario

Setup is easy in the Console. Alternatively, you can use the Oracle Cloud Infrastructure CLI or API, which lets you execute the individual operations yourself.

Using the Console

This example walks through using the Console to create a connector that receives subnet log data from Logging and then moves this data to a bucket in Object Storage.

For help with troubleshooting, see Troubleshooting Connectors.

Using the CLI

This example walks through using the CLI to create a connector that receives subnet log data from Logging and then moves this data to a bucket in Object Storage.

For information about using the API and signing requests, see REST API documentation and Security Credentials. For information about SDKs, see SDKs and the CLI.

  • Create a connector: Open a command prompt and run the oci sch service-connector create command:

    Command
    oci sch service-connector create --display-name
    "<display_name>" --compartment-id <compartment_OCID> --source [<source_in_JSON>] --target [<targets_in_JSON>]

For help with troubleshooting, see Troubleshooting Connectors.

Using the API

This example walks through using the API to create a connector that receives subnet log data from Logging and then moves this data to a bucket in Object Storage.

For information about using the API and signing requests, see REST API documentation and Security Credentials. For information about SDKs, see SDKs and the CLI.

Use the following operations:

  • CreateServiceConnector: Create a connector.

For help with troubleshooting, see Troubleshooting Connectors.