Configure data delivery to Simple Log Service

更新时间:
复制 MD 格式

Configure a Project and a Logstore in Simple Log Service to deliver resource change logs, resource non-compliance events, compliance snapshots, and scheduled resource snapshots. After the data is delivered, you can query and analyze the logs.

Prerequisites

  • You have activated Simple Log Service. For more information, see Activate Simple Log Service.

    Important

    Activating Simple Log Service is free. However, charges apply when Cloud Config delivers resource data to Simple Log Service and when you use the query and analysis features of Simple Log Service. For more information, see Billing overview.

  • To deliver large files to a bucket in Object Storage Service (OSS), activate OSS and create a bucket. For more information, see Console quick start.

    Note

    Ensure that the specified Region, Account, and Bucket Name for the large file recipient address match those of the regular file delivery address.

Background

Deleting the Project invalidates the delivery task in Cloud Config and stops data delivery. For more information, see Manage a Project.

Procedure

  1. Log on to the Cloud Config console.

  2. Optional. In the upper-left corner, select an account group.

    This operation is required only if you are using a management account of a resource directory. Otherwise, you do not need to perform the operation.

  3. In the left-side navigation pane, click Deliveries.

  4. On the Deliveries page, click Create Delivery in the upper-left corner.

  5. On the Create Delivery page, enter a Deliveries, set Channel Type to Log Service, and then configure the related parameters for Simple Log Service.

    The following table describes the parameters for resource data delivery.

      Parameter

      Description

      Content

      Select the resource data to deliver to Simple Log Service. Valid values:

      • Historical Configuration Changes: Cloud Config delivers a resource change log to Simple Log Service when a resource configuration changes.

      • Non-compliance Events: Cloud Config delivers a resource non-compliance event to Simple Log Service when a resource is evaluated as non-compliant.

      • Scheduled Snapshots: By default, Cloud Config delivers scheduled resource snapshots to Simple Log Service at 00:00:00 and 12:00:00 every day.

      • Compliance Snapshot: By default, Cloud Config delivers compliance snapshots to Simple Log Service at 00:00:00 and 12:00:00 every day.

      Note

      If you set Daily Delivery Time, Cloud Config delivers data at the specified time.

      Logstore Source

      The source of the Project in Simple Log Service. Valid values:

      • Create a new log item in this account.: In the Cloud Config console, select a region, and then create a Project and a Logstore. The Project name and Logstore name must be unique within the same account and region.

        Note

        A Logstore created through Cloud Config does not have any pre-configured indexes. To analyze the delivered data, you must enable indexing for the Logstore in the Simple Log Service console. For more information, see Create an index.

      • Select an existing log item in this account.: In Simple Log Service, select an existing region, Project, and Logstore.

        Note

        Ensure that the selected Logstore is empty or that the existing data in the Logstore is consistent with the data to be delivered. Otherwise, you cannot query and analyze the data after it is delivered.

      • Select an existing topic from other enterprise management accounts or delegated accounts (available only for a management account or delegated administrator account): Specify the Alibaba Cloud Resource Name (ARN) of the Logstore in the destination account. The ARN includes the Region, Members, Project Name, and Logstore Name.

        Member accounts cannot configure data delivery and must follow the settings specified by the management account.

        Note

        If the management account has configured a delegated administrator account for Cloud Config, the delegated administrator account can configure data delivery on behalf of the management account. For more information about how to add a delegated administrator account, see Add a delegated administrator account.

      Events of Specified Resource Type

      The resource types for which data will be delivered. For a list of resource types supported by Cloud Config, see Supported resource types and resource relationships.

      Daily Delivery Time

      The time of day to deliver scheduled resource snapshots and/or compliance snapshots.

      Note

      If you do not set this parameter, Cloud Config delivers data at 00:00:00 and 12:00:00 by default.

      Recipient Address For Large Files

      The destination for large files delivered to Simple Log Service.

      • If you set this parameter, files larger than 1 MB are automatically transferred to the specified Object Storage Service (OSS) bucket.

      • If you do not set this parameter, files larger than 1 MB are discarded.

  6. Click OK.

  7. (Optional) In the Confirm Operation dialog box, click OK.

    This operation is required only if you are using a management account of a resource directory. Otherwise, you do not need to perform the operation.

    Note

    The new delivery applies only to all members in the current account group.

Next steps

View the delivery results, then query and analyze the data.

  1. On the Deliveries page, click the ID of the delivery that you created.11.png

  2. In the Extended Information section of the target delivery, click the Logstore name. You are redirected to the page for that Logstore in the Simple Log Service console.12.png

  3. In the Error dialog box that appears, click Close.13.png

    Note

    This error occurs because indexing is not enabled by default for a Logstore created from the Cloud Config console.

  4. Enable indexes for the Logstore.

    For more information, see Create indexes.

  5. Query and analyze the logs in the Logstore.

    For more information, see Quick start for query and analysis.