ListDiagnoseReport

Updated at:

Retrieves 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:ListDiagnoseReport

none

*Instance

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

None None

Request syntax

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

Path Parameters

Parameter

Type

Required

Description

Example

InstanceId

string

Yes

The instance ID.

es-cn-n6w1qu7ei000p****

Request parameters

Parameter

Type

Required

Description

Example

lang

string

No

The language of the retrieved reports. Default value: the browser language. Valid values:

  • en: English.

  • zh: Simplified Chinese.

  • zt: Traditional Chinese.

  • es: Spanish.

  • fr: French.

es

startTime

integer

Yes

The start timestamp of the query. Unit: milliseconds.

  • Minimum value: 1000000000000.

  • Maximum value: 2000000000000.

1594569600000

endTime

integer

Yes

The end timestamp of the query. Unit: milliseconds.

  • Minimum value: 1000000000000.

  • Maximum value: 2000000000000.

1595174399999

page

integer

No

The page number. Default value: 1. Minimum value: 1. Maximum value: 200.

1

size

integer

No

The number of reports per page. Default value: 10. Minimum value: 1. Maximum value: 500.

20

detail

boolean

No

Specifies whether to display the details of diagnostic items.

true

trigger

string

No

The trigger method for the health diagnosis. Valid values:

  • SYSTEM (default): Automatically triggered by the system.

  • INNER: Internally triggered.

  • USER: Manually triggered by the user.

SYSTEM

Response elements

Element

Type

Description

Example

object

RequestId

string

The request ID.

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

Headers

object

The response headers.

X-Total-Count

integer

The total number of returned records.

15

Result

array<object>

The returned result.

array<object>

trigger

string

The trigger method for the health diagnosis. Valid values:

  • SYSTEM: Automatically triggered by the system.

  • INNER: Internally triggered.

  • USER: Manually triggered by the user.

USER

createTime

integer

The timestamp when the report was created.

1535745731000

reportId

string

The report ID.

trigger__2020-08-17T17:09:02f

state

string

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

SUCCESS

instanceId

string

The instance ID.

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 item information 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.

  • 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 list may be empty if details are not requested.

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 field is empty if details are not requested.

{"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****",
  "Headers": {
    "X-Total-Count": 15
  },
  "Result": [
    {
      "trigger": "USER",
      "createTime": 1535745731000,
      "reportId": "trigger__2020-08-17T17:09:02f",
      "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": "Monitor GC",
          "detail": {
            "result": "一切正常",
            "name": "集群健康",
            "suggest": "",
            "type": "TEXT",
            "desc": "检查集群健康状态。",
            "score": 100,
            "state": "GREEN"
          }
        }
      ],
      "diagnosisMode": "RULE"
    }
  ]
}

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.