POST /api/fleet/agents/{agentId}/request_diagnostics

Spaces method and path for this operation:

post /s/{space_id}/api/fleet/agents/{agentId}/request_diagnostics

Refer to Spaces for more information.

Request a diagnostics bundle from a specific agent.

[Required authorization] Route required privileges: fleet-agents-read.

Headers

  • kbn-xsrf string Required

    A required header to protect against CSRF attacks

Path parameters

  • agentId string Required
application/json

Body

  • additional_metrics array[string]

    Not more than 1 element. Value is CPU.

Responses

  • 200 application/json

    Successful response

    Hide response attribute Show response attribute object
    • actionId string Required
  • 400 application/json

    Bad Request

    Hide response attributes Show response attributes object
    • attributes Required
    • error string
    • errorType string
    • message string Required
    • statusCode number
POST /api/fleet/agents/{agentId}/request_diagnostics
curl \
 --request POST 'https://<KIBANA_URL>/api/fleet/agents/{agentId}/request_diagnostics' \
 --header "Authorization: $API_KEY" \
 --header "Content-Type: application/json" \
 --header "kbn-xsrf: true" \
 --data '{"additional_metrics":["CPU"]}'
Request example
Request a diagnostics bundle from an agent
{
  "additional_metrics": [
    "CPU"
  ]
}
Response examples (200)
Diagnostics action result
{
  "actionId": "action-id-1"
}
Response examples (400)
Example of a generic error response
{
  "error": "Bad Request",
  "message": "Agent agent-id-1 does not support request diagnostics action.",
  "statusCode": 400
}