DescribeDiagnoseReport

Updated at:

Queries the historical reports of intelligent O&M.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

Action

Access level

Resource type

Condition key

Dependent action

elasticsearch:DescribeDiagnoseReport

get

*Instance

acs:elasticsearch:{#regionId}:{#accountId}:instances/{#instancesId}

None None

Request syntax

GET /openapi/diagnosis/instances/{InstanceId}/reports/{ReportId} HTTP/1.1

Path Parameters

Parameter

Type

Required

Description

Example

InstanceId

string

Yes

The instance ID.

es-cn-mp91kzb8m0009****

ReportId

string

Yes

The report ID. You can obtain the report ID by calling the ListDiagnoseReportIds API.

scheduled__2020-09-15T00:40:00

Request parameters

Parameter

Type

Required

Description

Example

lang

string

No

The language in which the intelligent diagnostic report is generated. Default value: the browser language. Valid values:

  • en: English

  • zh: Simplified Chinese

  • zt: Traditional Chinese

  • es: Spanish

  • fr: French

en

Response elements

Element

Type

Description

Example

object

RequestId

string

The request ID.

5FFD9ED4-C2EC-4E89-B22B-1ACB6FE1****

Result

object

The returned result.

trigger

string

The trigger method for health diagnostics. Valid values: SYSTEM (automatically triggered by the system), INNER (internally triggered), and USER (manually triggered by the user).

SYSTEM

createTime

integer

The timestamp when the report was created. Unit: milliseconds.

1535745731000

reportId

string

The report ID.

trigger__2020-08-17T17:09:02

state

string

The diagnostic status. Valid values: SUCCESS, FAILED, and RUNNING.

SUCCESS

instanceId

string

The instance ID of the diagnosed instance.

es-cn-abc

health

string

The overall health status of the cluster in the report. Valid values: GREEN, YELLOW, RED, and UNKNOWN.

YELLOW

diagnoseItems

array<object>

The list of diagnostic items in the report.

array<object>

item

string

The name of the diagnostic item.

IndexAliasUseDiagnostic

health

string

The health status of the diagnostic item. Valid values: GREEN, YELLOW, RED, and UNKNOWN.

YELLOW

detail

object

The details of the diagnostic item.

type

string

The type of the diagnostic result. Valid values: TEXT (text description), CONSOLE_API (triggered by the console), and ES_API (triggered by the API).

ES_API

name

string

The full name of the diagnostic item.

Number of Replica Shards

desc

string

The description of the diagnostic item.

Check whether the number of replica shards is optimal and easy to maintain

result

string

The diagnostic result.

You may need to adjust the numbers of replica shards of some indices as follows: [geoname08 : 0 -> 1][geoname09 : 0 -> 1][geonametest01 : 0 -> 1]

suggest

string

The diagnostic suggestion.

You can call the following function in the Elasticsearch API....

items

array<object>

The list of diagnostic item details. This parameter may be empty if details are not required.

array<object>

The execution result of a single diagnostic item.

item

string

The code of the diagnostic item.

cluster.health

name

string

The name of the diagnostic item.

Cluster health

state

string

The health status of the diagnostic item. Valid values: GREEN, YELLOW, and RED.

GREEN

desc

string

The description of the diagnostic conclusion.

Everything is normal

suggest

string

The handling suggestion.

Monitor GC

detail

object

The diagnostic details. This parameter is empty if details are not required.

{"result":"Everything is normal","name":"Cluster health","suggest":"","type":"TEXT","desc":"Check the cluster health status.","score":100,"state":"GREEN"}

diagnosisMode

string

The diagnostic mode. Valid values: RULE and AGENT.

RULE

Examples

Success response

JSON format

{
  "RequestId": "5FFD9ED4-C2EC-4E89-B22B-1ACB6FE1****",
  "Result": {
    "trigger": "SYSTEM",
    "createTime": 1535745731000,
    "reportId": "trigger__2020-08-17T17:09:02",
    "state": "SUCCESS",
    "instanceId": "es-cn-abc",
    "health": "YELLOW",
    "diagnoseItems": [
      {
        "item": "IndexAliasUseDiagnostic",
        "health": "YELLOW",
        "detail": {
          "type": "ES_API",
          "name": "Number of Replica Shards",
          "desc": "Check whether the number of replica shards is optimal and easy to maintain",
          "result": "You may need to adjust the numbers of replica shards of some indices as follows: [geoname08 : 0 -> 1][geoname09 : 0 -> 1][geonametest01 : 0 -> 1]",
          "suggest": "You can call the following function in the Elasticsearch API...."
        }
      }
    ],
    "items": [
      {
        "item": "cluster.health",
        "name": "Cluster health",
        "state": "GREEN",
        "desc": "Everything is normal",
        "suggest": "Pay attention to GC",
        "detail": {
          "result": "一切正常",
          "name": "集群健康",
          "suggest": "",
          "type": "TEXT",
          "desc": "检查集群健康状态。",
          "score": 100,
          "state": "GREEN"
        }
      }
    ],
    "diagnosisMode": "RULE"
  }
}

Error codes

HTTP status code

Error code

Error message

Description

400 ComponentCodeValueError component value is disable
401 UserNotOpen Aliyun account is not open elasticsearch
401 StsRoleAccountNoPermission Role account has no permission or expired
401 SubAccountNoPermission Aliyun sub account has no permission, please authorize your sub account in Aliyun RAM
401 UserUnauthorized Authentication required

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.