Importing SLS Collection Configuration
Background description
In scenarios such as application migration or cross-service data migration, it is necessary to migrate log service collection configurations in batches for quick application in Baidu Log Service, enhancing migration efficiency. Baidu Log Service currently supports importing log collection configurations from SLS. Imported configurations include destination settings (e.g., Logstore), collection rules, and index configurations, but are not bound to any agent.
Note
- If the imported agent configuration name duplicates an existing transmission task name, the log service will ignore that configuration.
- While importing collection configurations, the log service automatically creates a project, LogStore, and transmission task based on the configuration. After importing, you can also modify the project, LogStore, and transmission task.
Prerequisites
- Collection configurations have already been created in Alibaba Cloud Simple Log Service (SLS).
- The Alibaba Cloud Access Key has been obtained. For migration, you need to provide Alibaba Cloud's AK, SK, and domain name, along with Baidu AI Cloud's AK, SK, and region details.
- Before using this feature for the first time, you must authorize cloud resource access, granting the log service product permission to access and write resources.
Migration steps
- Activate the Baidu Log Service (BLS) product
- Contact SLS support at the bottom right of the page and specify which SLS functions are used
- Provide the AK, SK, and domain name information for both SLS and BLS.
- BLS R&D team will assist in migrating specified configuration information via scripts in the backend
SDK migration
If you're using the SLS SDK, no additional migration steps are required. Simply replace the SLS SDK endpoint with the BLS SDK endpoint and update the AK, SK, and endpoint settings for a seamless switch.
API migration
For users accessing via Alibaba Cloud OpenAPI directly, certification information needs to be modified. Refer to [General Instructions](BLS/Development Guide/API Reference/General Description.md); then include the project name in the path parameter, e.g., https://bls-log.bj.baidubce.com/logstores?project=demo
Subsequent operations
Imported transmission tasks are not bound to any agent by default. You need to manually modify the agent to bind the transmission task to the specified agent for it to take effect. Refer to [Create a Transmission Task - Select Agent ](BLS/Operation guide/Logging/Transmission Task/Create Transmission Task.md)section.
