Configure a Huawei Cloud External Collection Source
Huawei Cloud external collection sources are used to collect slow logs from Huawei Cloud managed databases. The available instance types are subject to the options shown in the NineData console.
Prerequisites
- You have created or joined an organization, and this organization has subscribed to either DevOps Pro or DevOps Enterprise. Please ensure that your annual or monthly subscription is still active. For more information, please refer to Manage Organizations.
- Your current account has switched to the target organization. For more information, please refer to Switching to an Organization.
- Huawei Cloud access credentials have already been configured in NineData. For more information, see Configure Cloud Vendor Access Credentials.
- The target Huawei Cloud data source has already been added. It is recommended to create or bind the instance through the Huawei Cloud entry.
- You have confirmed the target instance region, project ID, and instance ID.
- Slow logging is enabled on the target instance, and the cloud account has permission to view the target instance and read slow logs from it.
Permission Requirements
If you use a custom Huawei Cloud identity policy, make sure it includes at least the following RDS permissions. rds:log:getSlowLogs and rds:log:download are the core permissions for querying and downloading slow logs. The instance query permissions are used when creating the source, binding a data source, or validating instance information.
| Action | Purpose |
|---|---|
rds:instance:list | View basic RDS instance information. |
rds:instance:listAll | Query instance lists or related instance information for diagnostics. |
rds:log:getSlowLogs (or the alias rds:log:list shown in some policies) | Query slow query logs from the target instance. |
rds:log:download | Obtain or download slow log files. |
If you use a Huawei Cloud system policy, confirm that it includes slow log query and download permissions. Ordinary instance-view permissions alone may not be enough for external slow log collection.
Step 1: Create a Huawei Cloud External Collection Source
Log in to the NineData Console.
In the left navigation pane, click DevOps > Slow Query.
On the top tab bar, click External Collection Source.
Click Create External Collection Source, then complete the following configuration in the drawer.
Parameter Description Source Type Select Huawei Cloud. Cloud Access Credential Select the configured Huawei Cloud access credential. Source Name Enter a custom source name. Description Optional. Enter a description for this source. Click OK to create the source.
Step 2: Bind the Source and Enable Collection
Return to the Slow Query tab, find the target Huawei Cloud data source, and turn on the switch in the Slow Query column.
In the dialog, select External Source Collection, then complete the following configuration.
Parameter Description External Collection Source Select the Huawei Cloud external collection source you created. Source Data Source Unique Identifier Enter Huawei Cloud instance identifiers as required by the page. They usually include project_id,instance_id, andregion.Collection Frequency Select the slow log collection frequency. Enter the Huawei Cloud instance identifiers.
Key Description project_idHuawei Cloud project ID. instance_idHuawei Cloud database instance ID. regionHuawei Cloud region identifier. tipIf the key names shown in the console are different, use the page requirements and the actual instance information in the Huawei Cloud console.
Click OK to enable collection.
Step 3: Confirm Collection Results
Wait for at least one collection cycle, then open the Slow Query Details page of the target data source. Adjust the time range and check the slow log list, Top SQL, and trend chart to confirm whether slow log records have been written to NineData.
The slow query detail page displays records from a maximum time range of 3 days. If the target instance has no new slow logs, the query result is empty.
FAQ
| Symptom | Recommended Check |
|---|---|
| Cloud access credential not found | Create Huawei Cloud access credentials in NineData first. |
| The collection task reports insufficient permissions | Check whether the Huawei Cloud identity policy includes both target instance query permissions and slow log query/download permissions. |
| Region or project parameter is missing | Fill in region and project_id, and make sure they match the target instance. |
| Instance ID is missing | Fill in instance_id, and make sure it matches the Huawei Cloud console. |
| Cloud vendor client connection failed | Check whether the data source was created through the Huawei Cloud entry. If not, confirm the connection method, region, project, and instance identifier. |
| Collection result is empty | Make sure slow logging is enabled on the target instance and slow queries were generated within the selected time range. |