文档首页/ 云搜索服务 CSS/ API参考(联盟区域)/ API V1/ 智能运维/ 获取智能运维诊断任务列表及详情
更新时间:2026-09-03 GMT+08:00

获取智能运维诊断任务列表及详情

功能介绍

CSS服务提供智能运维功能,支持智能诊断集群潜在风险。诊断任务完成后,可以查看集群存在的风险项详情,根据风险建议及时处理集群存在的风险。此接口用于获取智能运维诊断任务列表及详情。

适用于Elasticsearch和OpenSearch引擎。

调用方法

请参见如何调用API

URI

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

表1 路径参数

参数

是否必选

参数类型

描述

project_id

String

参数解释

项目ID。获取方法请参见获取项目ID和名称

约束限制

不涉及

取值范围

账号的项目ID。

默认取值

不涉及

cluster_id

String

参数解释

指定查询的集群ID。获取方法请参见获取集群ID

约束限制

不涉及

取值范围

集群ID。

默认取值

不涉及

表2 Query参数

参数

是否必选

参数类型

描述

limit

Integer

参数解释

分页参数,列表当前分页的数量限制。默认值为10,即一次查询10个任务信息。

约束限制

不涉及

取值范围

1-1000

默认取值

10

offset

Integer

参数解释

偏移量,指定查询起始值,默认值为0,即从第0个任务开始查询。

约束限制

不涉及

取值范围

大于或等于0

默认取值

0

report

String

参数解释

获取当前最新一份报告或历史报告

约束限制

不涉及

取值范围

  • current 仅获取当前最新一次诊断报告

  • history 仅获取当前历史诊断报告

默认取值

不涉及

请求参数

响应参数

状态码:200

表3 响应Body参数

参数

参数类型

描述

aiops_list

Array of aiops_list objects

参数解释

集群智能诊断任务详情列表。

取值范围

不涉及

表4 aiops_list

参数

参数类型

描述

id

String

参数解释

集群智能诊断任务ID。

取值范围

不涉及

check_type

String

参数解释

诊断类型

取值范围

  • full_detection:全量检测

  • unavailability_detection:集群不可用检测

  • partial_detection:部分检测

trigger_type

String

参数解释

触发类型

取值范围

  • manual:手动

  • auto:自动

name

String

参数解释

集群智能诊断任务名称。

取值范围

不涉及

desc

String

参数解释

集群智能诊断任务描述。

取值范围

不涉及

status

Integer

参数解释

任务执行状态。

取值范围

  • 150:未开启。

  • 200:已开启。

  • 300:已发送。

summary

summary object

参数解释

集群风险概要。

取值范围

不涉及

create_time

String

参数解释

集群智能诊断任务创建时间。

取值范围

格式:Unix时间戳格式。

task_risks

Array of task_risks objects

参数解释

集群风险项详情。

取值范围

不涉及

表5 summary

参数

参数类型

描述

highRisk

Integer

参数解释

集群风险检测项判定为高风险的数量。

取值范围

0-100

mediumRisk

Integer

参数解释

集群风险检测项判定为中风险的数量。

取值范围

0-100

normal

Integer

参数解释

集群风险检测项判定为正常项的数量。

取值范围

0-100

suggestion

Integer

参数解释

集群风险检测项判定为提示项的数量。

取值范围

0-100

表6 task_risks

参数

参数类型

描述

id

String

参数解释

检测项ID

取值范围

不涉及

name

String

参数解释

检测项名称

取值范围

不涉及

desc

String

参数解释

检测项说明

取值范围

不涉及

level

String

参数解释

检测结果风险等级

取值范围

  • highRisk:高风险

  • mediumRisk:中风险

  • normal:正常项

  • suggestion:提示项

result

String

参数解释

检测结果

取值范围

不涉及

suggestion

String

参数解释

检测建议

取值范围

不涉及

请求示例

获取智能运维任务列表及详情。

GET https://{Endpoint}/v1.0/{project_id}/clusters/4f3deec3-efa8-4598-bf91-560aad1377a3/ai-ops

响应示例

状态码:200

请求成功。

{
  "aiops_list" : [ {
    "id" : "id-id-id",
    "name" : "aiops-1765457366399",
    "desc" : null,
    "status" : 200,
    "summary" : {
      "highRisk" : 1,
      "mediumRisk" : 0,
      "normal" : 0,
      "suggestion" : 0
    },
    "trigger_type" : "manual",
    "check_type" : "partial_detection",
    "create_time" : 1765457366399,
    "task_risks" : [ {
      "id" : "nodeLeftCheck",
      "name" : "name",
      "desc" : "Check the connectivity of cluster nodes. Node disconnection will severely compromise cluster performance and therefore needs to be handled immediately.",
      "level" : "highRisk",
      "result" : "Check the connectivity of cluster nodes. Node disconnection will severely compromise cluster performance and therefore needs to be handled immediately.",
      "suggestion" : "Check the cluster's parameter settings.\nCheck and repair custom plug-ins.\nScale up data node specs or quantity"
    } ]
  } ]
}

状态码

状态码

描述

200

请求成功。

400

非法请求。

建议直接修改该请求,不要重试该请求。

409

服务器在完成请求时发生冲突。

返回该状态码,表明客户端尝试创建的资源已经存在,或者由于冲突请求的更新操作不能被完成。

412

未满足前提条件,服务器未满足请求者在请求中设置的其中一个前提条件。

错误码

请参见错误码