Queries a historical intelligent O&M report.
Debugging
Request headers
This operation uses only common request headers. For more information, see Common request headers.
Request syntax
GET /openapi/diagnosis/instances/{InstanceId}/reports/{ReportId} HTTP/1.1
Request parameters
Parameter | Type | Position | Required | Example | Description |
---|---|---|---|---|---|
InstanceId | String | Path | Yes | es-cn-mp91kzb8m0009**** |
The ID of the instance. |
lang | String | Query | No | en |
The language in which the intelligent diagnostic report is generated. The default is the browser language. Supported:
|
ReportId | String | Path | Yes | scheduled__2020-09-15T00:40:00 |
The ID of the report. It can be obtained by using the ListDiagnoseReportIds API. |
Response parameters
Parameter | Type | Example | Description |
---|---|---|---|
RequestId | String | 5FFD9ED4-C2EC-4E89-B22B-1ACB6FE1**** |
The ID of the request. |
Result | Object |
The result of the request. |
|
trigger | String | SYSTEM |
The trigger mode of health diagnostics. Supported: SYSTEM (automatic system trigger), INNER (internal trigger), and USER (manual user trigger). |
createTime | Long | 1535745731000 |
The timestamp when the report was created. Unit: ms. |
reportId | String | trigger__2020-08-17T17:09:02 |
The ID of the report. |
state | String | SUCCESS |
The diagnosis status. Valid values: Supported: SUCCESS, FAILED, and RUNNING. |
instanceId | String | es-cn-abc |
The ID of the instance for diagnosis. |
health | String | YELLOW |
The overall health of the cluster in the report. Supported: GREEN, YELLOW, RED, and UNKNOWN. |
diagnoseItems | Array of diagnoseItems |
Reports the list of diagnostic item information. |
|
item | String | IndexAliasUseDiagnostic |
The name of the item. |
health | String | YELLOW |
The health of the diagnostic item. Supported: GREEN, YELLOW, RED, and UNKNOWN. |
detail | Object |
The details of the diagnostic item. |
|
type | String | ES_API |
The type of the diagnostic result. Supported: TEXT (text description), CONSOLE_API (console trigger), ES_API(API trigger). |
name | String | Number of Replica Shards |
The full name of the diagnostic item. |
desc | String | Check whether the number of replica shards is optimal and easy to maintain |
The description of the diagnostic item. |
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] |
The diagnosis. |
suggest | String | You can call the following function in the Elasticsearch API.... |
The suggestion for the diagnosis. |
Example
Sample requests
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
Sample success responses
JSON
format
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****"
}
Error codes
For a list of error codes, see Service error codes.