調(diào)用DescribeDiagnoseReport,查看智能運(yùn)維的歷史報(bào)告。
調(diào)試
您可以在OpenAPI Explorer中直接運(yùn)行該接口,免去您計(jì)算簽名的困擾。運(yùn)行成功后,OpenAPI Explorer可以自動(dòng)生成SDK代碼示例。
請(qǐng)求頭
該接口使用公共請(qǐng)求頭,無特殊請(qǐng)求頭。請(qǐng)參見公共請(qǐng)求參數(shù)文檔。
請(qǐng)求語法
GET /openapi/diagnosis/instances/{InstanceId}/reports/{ReportId} HTTP/1.1
請(qǐng)求參數(shù)
名稱 | 類型 | 位置 | 是否必選 | 示例值 | 描述 |
---|---|---|---|---|---|
InstanceId | String | Path | 是 | es-cn-mp91kzb8m0009**** |
實(shí)例ID。 |
lang | String | Query | 否 | en |
生成智能診斷報(bào)告的語言。默認(rèn)為瀏覽器語言,支持:
|
ReportId | String | Path | 是 | scheduled__2020-09-15T00:40:00 |
報(bào)告ID。可通過ListDiagnoseReportIds API獲取。 |
返回?cái)?shù)據(jù)
名稱 | 類型 | 示例值 | 描述 |
---|---|---|---|
RequestId | String | 5FFD9ED4-C2EC-4E89-B22B-1ACB6FE1**** |
請(qǐng)求ID。 |
Result | Object |
返回結(jié)果。 |
|
trigger | String | SYSTEM |
健康診斷的觸發(fā)方式。支持:SYSTEM(系統(tǒng)自動(dòng)觸發(fā))、INNER(內(nèi)部觸發(fā))和USER(用戶手動(dòng)觸發(fā))。 |
createTime | Long | 1535745731000 |
報(bào)告創(chuàng)建的時(shí)間戳,單位:ms。 |
reportId | String | trigger__2020-08-17T17:09:02 |
報(bào)告ID。 |
state | String | SUCCESS |
診斷狀態(tài)。支持:SUCCESS、FAILED和RUNNING。 |
instanceId | String | es-cn-abc |
診斷的實(shí)例ID。 |
health | String | YELLOW |
報(bào)告中集群整體的健康度。支持:GREEN、YELLOW、RED和UNKNOWN。 |
diagnoseItems | Array of diagnoseItems |
報(bào)告診斷項(xiàng)信息列表。 |
|
item | String | IndexAliasUseDiagnostic |
診斷項(xiàng)名稱。 |
health | String | YELLOW |
診斷項(xiàng)的健康度。支持:GREEN、YELLOW、RED和UNKNOWN。 |
detail | Object |
診斷項(xiàng)詳情。 |
|
type | String | ES_API |
診斷結(jié)果類型。支持:TEXT(文本描述)、CONSOLE_API(控制臺(tái)觸發(fā)型)、ES_API(API觸發(fā)型)。 |
name | String | Number of Replica Shards |
診斷項(xiàng)全稱。 |
desc | String | Check whether the number of replica shards is optimal and easy to maintain |
診斷項(xiàng)說明。 |
result | String | You may need to adjust the numbers of replica shards of some indices as follows: [geoname08 : 0 -> 1][geoname09 : 0 -> 1][geonametest01 : 0 -> 1] |
診斷結(jié)果。 |
suggest | String | You can call the following function in the Elasticsearch API.... |
診斷建議。 |
示例
請(qǐng)求示例
GET /openapi/diagnosis/instances/es-cn-mp91kzb8m0009****/reports/scheduled__2020-09-15T00:40:00?lang=en HTTP/1.1
Host:elasticsearch.aliyuncs.com
Content-Type:application/json
正常返回示例
JSON
格式
HTTP/1.1 200 OK
Content-Type:application/json
{
"Result" : {
"reportId" : "scheduled__2020-09-15T02:40:00",
"instanceId" : "es-cn-09k1rocex0006****",
"state" : "SUCCESS",
"trigger" : "INNER",
"health" : "YELLOW",
"createTime" : 1600108800000,
"diagnoseItems" : [ {
"item" : "IndexReplicaDiagnostic",
"health" : "YELLOW",
"detail" : {
"name" : "Number of Replica Shards",
"desc" : "Check whether the number of replica shards is optimal and easy to maintain.\nReplica shards can increase the index data reliability and improve the QPS if the resources are sufficient. However, too many replica shards may consume large amounts of disk space and memory. This reduces the performance of write operations.",
"type" : "CONSOLE_API",
"suggest" : "You can call the following function in the Elasticsearch API: \nPUT ${index}/_settings\n{\n \"settings\": {\n \"index.number_of_replicas\": \"${num}\"\n }\n} \r\nSet the index and num parameters to the actual values.",
"result" : "You may need to adjust the numbers of replica shards of some indices as follows: \n[geoname08 : 0 -> 1][geoname09 : 0 -> 1][geonametest01 : 0 -> 1]"
}
}, {
"item" : "IndexShardsDiagnostic",
"health" : "YELLOW",
"detail" : {
"name" : "Number and Sizes of Shards in Each Index",
"desc" : "Check whether the number and sizes of shards in each index are optimal.\nA small number of shards may degrade the read and write performance of an index. A large number of shards consume a lot of system resources and degrade the read and write performance of an index.",
"type" : "ES_API",
"suggest" : "We recommend the following solution: \nhotmovies [size < 1 GB] [7 -> 1, 3]\ngeoname08 [2 GB] [5 -> 1, 3]\ngeoname09 [3 GB] [5 -> 1, 3]\ngeonametest01 [2 GB] [5 -> 1, 3]\n \r\nThis solution applies to the current index sizes. Adjust the number of shards based on the future indices and nodes.",
"result" : "You may need to adjust the number of shards in some indices."
}
} ]
},
"RequestId" : "7BABD728-1584-432C-A300-25BEBDFC****"
}
錯(cuò)誤碼
訪問錯(cuò)誤中心查看更多錯(cuò)誤碼。