Skip to main content

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.

ActionPurpose
rds:instance:listView basic RDS instance information.
rds:instance:listAllQuery 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:downloadObtain or download slow log files.
tip

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

  1. Log in to the NineData Console.

  2. In the left navigation pane, click DevOps > Slow Query.

  3. On the top tab bar, click External Collection Source.

  4. Click Create External Collection Source, then complete the following configuration in the drawer.

    ParameterDescription
    Source TypeSelect Huawei Cloud.
    Cloud Access CredentialSelect the configured Huawei Cloud access credential.
    Source NameEnter a custom source name.
    DescriptionOptional. Enter a description for this source.
  5. Click OK to create the source.

Step 2: Bind the Source and Enable Collection

  1. Return to the Slow Query tab, find the target Huawei Cloud data source, and turn on the switch in the Slow Query column.

  2. In the dialog, select External Source Collection, then complete the following configuration.

    ParameterDescription
    External Collection SourceSelect the Huawei Cloud external collection source you created.
    Source Data Source Unique IdentifierEnter Huawei Cloud instance identifiers as required by the page. They usually include project_id, instance_id, and region.
    Collection FrequencySelect the slow log collection frequency.
  3. Enter the Huawei Cloud instance identifiers.

    KeyDescription
    project_idHuawei Cloud project ID.
    instance_idHuawei Cloud database instance ID.
    regionHuawei Cloud region identifier.
    tip

    If the key names shown in the console are different, use the page requirements and the actual instance information in the Huawei Cloud console.

  4. 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.

tip

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

SymptomRecommended Check
Cloud access credential not foundCreate Huawei Cloud access credentials in NineData first.
The collection task reports insufficient permissionsCheck whether the Huawei Cloud identity policy includes both target instance query permissions and slow log query/download permissions.
Region or project parameter is missingFill in region and project_id, and make sure they match the target instance.
Instance ID is missingFill in instance_id, and make sure it matches the Huawei Cloud console.
Cloud vendor client connection failedCheck 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 emptyMake sure slow logging is enabled on the target instance and slow queries were generated within the selected time range.