Capture diagnostics for an Elasticsearch or Kibana resource
editCapture diagnostics for an Elasticsearch or Kibana resource
editRetrieves a diagnostic bundle from an active cluster. To successfully retrieve a diagnostic bundle, the cluster must be responsive.
Request
editPOST /api/v1/deployments/{deployment_id}/{resource_kind}/{ref_id}/diagnostics/_capture
Path parameters
editName | Type | Required | Description |
---|---|---|---|
|
|
Y |
Identifier for the Deployment |
|
|
Y |
User-specified RefId for the Resource (or '_main' if there is only one). |
|
|
Y |
The kind of resource (one of elasticsearch or kibana). |
Query parameters
editName | Type | Required | Description |
---|---|---|---|
|
|
N |
Capture mode - whether to obtain all the diagnostics data or the lightweight, essential-only subset of it. Applicable only to Elasticsearch, ignored for any other components which have just one capture mode implemented. |
Responses
edit-
200
-
(
string
asbyte
)The diagnostic bundle as a zip file
-
404
-
-
The Deployment specified by {deployment_id} cannot be found. (code:
deployments.deployment_not_found
) -
The Resource specified by {ref_id} cannot be found. (code:
deployments.deployment_resource_not_found
)
Headers
-
x-cloud-error-codes
(string
; allowed values: [deployments.deployment_not_found
,deployments.deployment_resource_not_found
]) - The error codes associated with the response
-
The Deployment specified by {deployment_id} cannot be found. (code:
-
412
-
The diagnostics cannot be generated because the cluster is either stopped or initializing. (code:
clusters.cluster_plan_state_error
)Headers
-
x-cloud-error-codes
(string
; allowed values: [clusters.cluster_plan_state_error
]) - The error codes associated with the response
-
Request example
editcurl -XPOST https://{{hostname}}/api/v1/deployments/{deployment_id}/{resource_kind}/{ref_id}/diagnostics/_capture \ -H "Authorization: ApiKey $ECE_API_KEY"