Capture diagnostics for an Elasticsearch or Kibana resourceedit

Retrieves a diagnostic bundle from an active cluster. To successfully retrieve a diagnostic bundle, the cluster must be responsive.

Requestedit

POST /api/v1/deployments/{deployment_id}/{resource_kind}/{ref_id}/diagnostics/_capture

Path parametersedit

Name Type Required Description

deployment_id

string

Y

Identifier for the Deployment

ref_id

string

Y

User-specified RefId for the Resource (or '_main' if there is only one).

resource_kind

string

Y

The kind of resource (one of elasticsearch or kibana).

Query parametersedit

Name Type Required Description

mode

string; allowed values: [full, light]; default: "Full"

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.

Responsesedit

200

(string as byte)

The diagnostic bundle as a zip file

404

(BasicFailedReply)

  • 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
412

(BasicFailedReply)

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 exampleedit

curl -XPOST https://{{hostname}}/api/v1/deployments/{deployment_id}/{resource_kind}/{ref_id}/diagnostics/_capture \
-H "Authorization: ApiKey $ECE_API_KEY"