Get snapshot lifecycle management statistics Generally available; Added in 7.5.0

GET /_slm/stats

Get global and policy-level statistics about actions taken by snapshot lifecycle management.

Required authorization

  • Cluster privileges: manage_slm

Query parameters

  • master_timeout string

    Period to wait for a connection to the master node. If no response is received before the timeout expires, the request fails and returns an error.

    Values are -1 or 0.

  • timeout string

    Period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error.

    Values are -1 or 0.

Responses

  • 200 application/json
    Hide response attributes Show response attributes object
    • retention_deletion_time string Required

      A duration. Units can be nanos, micros, ms (milliseconds), s (seconds), m (minutes), h (hours) and d (days). Also accepts "0" without a unit and "-1" to indicate an unspecified value.

    • retention_deletion_time_millis number

      Time unit for milliseconds

    • retention_failed number Required
    • retention_runs number Required
    • retention_timed_out number Required
    • total_snapshots_deleted number Required
    • total_snapshot_deletion_failures number Required
    • total_snapshots_failed number Required
    • total_snapshots_taken number Required
    • policy_stats array[object] Required
      Hide policy_stats attributes Show policy_stats attributes object
      • policy string Required
      • snapshots_taken number Required
      • snapshots_failed number Required
      • snapshots_deleted number Required
      • snapshot_deletion_failures number Required
GET /_slm/stats
resp = client.slm.get_stats()
const response = await client.slm.getStats();
response = client.slm.get_stats
$resp = $client->slm()->getStats();
curl -X GET -H "Authorization: ApiKey $ELASTIC_API_KEY" "$ELASTICSEARCH_URL/_slm/stats"
Response examples (200)
A successful response from `GET /_slm/stats`.
{
  "retention_runs": 13,
  "retention_failed": 0,
  "retention_timed_out": 0,
  "retention_deletion_time": "1.4s",
  "retention_deletion_time_millis": 1404,
  "policy_stats": [ ],
  "total_snapshots_taken": 1,
  "total_snapshots_failed": 1,
  "total_snapshots_deleted": 0,
  "total_snapshot_deletion_failures": 0
}