Obtaining the Intelligent O&M Task List and Details

Function

This API is used to obtain the intelligent O&M task list and details.

URI

GET /v1.0/{project_id}/clusters/{cluster_id}/ai-ops

Table 1 Path parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

Project ID. For details about how to obtain a project ID, see Obtaining a Project ID and Name.

cluster_id

Yes

String

ID of the cluster to be queried

Table 2 Query parameter

Parameter

Mandatory

Type

Description

limit

No

Integer

Maximum number of records displayed on a page

start

No

Integer

Offset. All VPC endpoint services after this offset will be queried. The offset must be an integer greater than 0 but less than the number of VPC endpoint services.

Request Parameters

None

Response Parameters

Status code: 200

Table 3 Response body parameter

Parameter

Type

Description

total_size

Integer

Number of cluster detection tasks

aiops_list

Array of aiops_list objects

Detection task list

Table 4 aiops_list

Parameter

Type

Description

id

String

Detection task ID

name

String

Detection task name

desc

String

Detection task description

status

Integer

Task execution status.

  • 150: Disabled

  • 200: Enabled

  • 300: Sent

summary

summary object

Risk summary

create_time

String

Timestamp when a detection task is created

smn_status

String

Status of SMN alarm messages.

  • not_open

  • not_trigger

  • sent

  • send_fail

smn_fail_reason

String

Cause of the message sending failure

task_risks

Array of AIOpsRiskInfo objects

Risk item details

Table 5 summary

Parameter

Type

Description

high

Integer

Number of high-risk items

medium

Integer

Number of medium-risk items

suggestion

Integer

Number of suggestion items

Table 6 AIOpsRiskInfo

Parameter

Type

Description

riskType

String

Check item description

level

String

Severity.

  • high

  • medium

  • suggestion

desc

String

Risk description

suggestion

String

Suggestions for the risks

Request Example

Obtain the intelligent O&M task list and details.

GET /v1.0/6204a5bd270343b5885144cf9c8c158d/clusters/4f3deec3-efa8-4598-bf91-560aad1377a3/ai-ops

Response Example

Status code: 200

Request sent.

{
  "aiops_list" : [ {
    "id" : "7381a80b-68cb-4b9e-8226-37d686b18b1d",
    "name" : "aiops-test",
    "desc" : "",
    "status" : 200,
    "summary" : {
      "high" : 1,
      "medium" : 0,
      "suggestion" : 1
    },
    "create_time" : 1687944156750,
    "smn_status" : "not_open",
    "smn_fail_reason" : null,
    "task_risks" : [ {
      "riskType" : "Check whether the cluster has snapshot backup failures or no snapshot backup records in the last seven days."
      "level" : "suggestion",
      "desc" : "The cluster has no snapshot backup records in the last seven days."
      "suggestion" : "You are advised to enable the cluster snapshot function and ensure that snapshots generated in the last seven days are successfully backed up. If snapshot creation fails, click the cluster name, and check the failure details on the Cluster Snapshots and Logs pages."
    }, {
      "riskType" : "Check the number of nodes in the cluster and the number of AZs to evaluate the high availability of the distributed Elasticsearch cluster."
      "level" : "high",
      "desc" : "The current cluster has one or two nodes. If a node is faulty, the entire cluster may become unavailable. The service availability risk is high."
      "suggestion" : "You are advised to change the cluster to a multi-AZ cluster. Procedure: On the CSS cluster console, choose Clusters > Elasticsearch. In the Operation column of a cluster, choose More > Modify Configuration. Click the Change AZ tab and add AZs. Click the Scale Cluster tab and change the number of nodes.
    } ]
  } ],
  "total_size" : 1
}

Status Codes

Status Code

Description

200

Request sent.

400

Invalid request.

Modify the request instead of retrying.

409

The request cannot be processed due to a conflict.

This status code indicates that the resource that the client attempts to create already exists, or the request fails to be processed because of the update of the conflict request.

412

The server does not meet one of the requirements that the requester puts on the request.

Error Codes

For details, see Error Code.