You can deliver resource change logs, resource non-compliance events, compliance snapshots, and scheduled resource snapshots to a Logstore in a project in Simple Log Service. After resource data is delivered to the specified Logstore as logs, you can query and analyze the delivered logs.
Prerequisites
Simple Log Service is activated. For more information, see Activate Simple Log Service.
ImportantYou are not charged when you activate Simple Log Service. Cloud Config delivers resource data to Simple Log Service, and you are charged if you use the query and analysis features of Simple Log Service. For more information, see Billing overview.
Object Storage Service (OSS) is activated and an OSS bucket is created if you want to deliver large files to an OSS bucket. For more information, see Get started by using the OSS console.
NoteMake sure that the settings of the Region, Account, and Bucket Name parameters in the Recipient Address For Large Files section are the same as those of the recipient address for regular files.
Background information
If you no longer need to deliver resource data to Simple Log Service, you can delete the Simple Log Service project in the Simple Log Service console to prevent Simple Log Service from incurring fees. After you delete the Simple Log Service project, the delivery task in Cloud Config becomes invalid and the resource data is no longer delivered. For more information, see Delete a project.
Procedure
Log on to the Cloud Config console.
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.
In the left-side navigation pane, click
.On the Deliveries page, click Create Delivery in the upper-left corner.
On the Create Delivery page, configure the Delivery Name parameter, set the Channel Type parameter to Log Service, and then configure the parameters of Simple Log Service.
The following table describes the parameters for resource data delivery.
Parameter
Description
Content
The type of resource data that you want to deliver to Simple Log Service. Valid values:
Historical Configuration Changes: resource change logs. When the configuration of a resource changes, Cloud Config delivers the resource change log to Simple Log Service.
Noncompliance Resource Events: resource non-compliance events. If a resource is evaluated as non-compliant, Cloud Config delivers the resource non-compliance event to Simple Log Service.
Scheduled Snapshots: scheduled resource snapshots. Cloud Config delivers resource snapshots to Simple Log Service at 00:00:00 and 12:00:00 every day.
Compliance Snapshot: compliance snapshots. Cloud Config delivers compliance snapshots to Simple Log Service at 00:00:00 and 12:00:00 every day.
NoteIf you specify Daily Delivery Time, Cloud Config delivers resource data based on the specified time.
Logstore Source
The source of the Logstore. Valid values:
Create a new log item in this account: In the Cloud Config console, select a region, and create a project and a Logstore in the region. The project name and Logstore name must be unique in an Alibaba Cloud account in the same region.
NoteThe Logstore created by using Cloud Config does not contain any preset indexes. If you need to analyze delivery data, you must enable the indexing feature for the Logstore in the Simple Log Service console. For more information, see Create indexes.
Select an existing log item in this account: Select a region, a project, and a Logstore in Simple Log Service.
NoteMake sure that the Logstore that you select is empty or the existing data in the Logstore is consistent with the data that you want to deliver. Otherwise, the data cannot be queried or analyzed after it is delivered to the Logstore.
Select an existing topic from other enterprise management accounts or delegated accounts: Specify the Alibaba Cloud Resource Name (ARN) of the Logstore in the destination account. The ARN contains the following information: region, member, project name, and Logstore name.
You can deliver the resource data of your account and all member accounts in the resource directory to the Logstores of specific members. You can use only management accounts to configure the delivery settings of resource data. Members do not have the permissions to configure the settings.
NoteIf a delegated administrator account is configured by using a management account, the administrator account can be used to configure resource data delivery. For more information, see Add a delegated administrator account.
Events Of Specified Resource Type
The resource type of the data that you want to deliver. For more information about the resource types supported by Cloud Config, see Alibaba Cloud services and resource types supported by Cloud Config.
Daily Delivery Time
The time when Cloud Config delivers scheduled resource snapshots or compliance snapshots every day.
NoteIf you do not specify this parameter, Cloud Config delivers resource snapshots to the OSS bucket at 00:00:00 and 12:00:00 every day.
Recipient Address For Large Files
The OSS bucket that is used to receive the large files that Cloud Config delivers to the Logstore in Simple Log Service.
If you configure this parameter, a file whose size exceeds 1 MB is automatically transferred to the specified OSS bucket.
If you do not configure this parameter, a file whose size exceeds 1 MB is automatically discarded.
Click OK.
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.
NoteThe newly created delivery task takes effect only on all members in the account group.
What to do next
View the delivery result of resource data, and query and analyze logs in the Logstore.
On the Deliveries page, click the newly created delivery ID.
In the Extended Information section of the page that appears, click the name of the Logstore.
You are redirected to the destination Logstore page in the Simple Log Service console.
In the Error message, click Close.
NoteThe indexing feature is not enabled for a Logstore created in the Cloud Config console by default, and the system reports an error.
Enable the indexing feature for the Logstore.
For more information, see Create indexes.
Query and analyze logs in the Logstore.
For more information, see Query and analyze logs.
NoteFor more information about the sample files in the JSON format, see Examples of resource change logs, Example of resource non-compliance events, and Example of scheduled resource snapshots.