Skip to content

prometheus snapshot

Create a snapshot of all current data

Description

Creates a snapshot of all current data into snapshots/- under the TSDB's data directory and returns the directory as response. It will optionally skip snapshotting data that is only present in the head block, and which has not yet been compacted to disk.

Synopsis

prometheus snapshot
    [--site <site>]
    [--cluster <cluster>]
    [--skip_head]

Arguments

site - (string)

     Site where this command will be executed
     Example: --site "site-1"
     Default: input.site      Attributes: optional

cluster - (string)

     Name of prometheus cluster
     Example: --cluster "prometheus-default"
     Default: prometheus-default      Attributes: optional

skip_head - (bool)

     Skip data present in the head block
     Example: --skip_head
     Default: _None_      Attributes: optional

Examples

Input:

! prometheus snapshot
Output:
{
  "status": "success",
  "data": {
    "name": "20211021T115101Z-25ffe8c87b4ff6da"
  }
}

Access Control

To use this command, you need access to the following:

Field Value
Action "update"
Service Type "prometheus"
Service Instance cluster
Namespace
Object Type
Object ID

Please see Access Control for details.