Skip to content

prometheus delete-series

Delete data for a selection of series in a time range

Description

Delete data for a selection of series in a time range. The actual data still exists on disk and is cleaned up in future compactions or can be explicitly cleaned up by hitting the Clean Tombstones endpoint.

Synopsis

prometheus delete-series
    [--site <site>]
    [--cluster <cluster>]
    [--start_time <start_time>]
    [--end_time <end_time>]
    <series_selector>

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

start_time - (string)

     Start timestamp (inclusive, Should be provided in rfc3339 format)
     Example: --start_time "2015-07-01T20:10:51.781Z"
     Default: _None_      Attributes: optional

end_time - (string)

     End timestamp (inclusive, Should be provided in rfc3339 format)
     Example: --end_time "2015-07-01T20:10:51.781Z"
     Default: _None_      Attributes: optional

series_selector - (string)

     label matcher argument that selects the series to delete. At least one series_selector argument must be provided.
     Example: "up"
     Default: _None_      Attributes: required, multiple allowed

Examples

Input:

! prometheus delete-series "up"
Output:

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.