Skip to content

Commit

Permalink
Docs: Document how to delete an interval via `thanos tools bucket rew…
Browse files Browse the repository at this point in the history
…rite` (#5726)

Signed-off-by: Igor Wiedler <[email protected]>

Signed-off-by: Igor Wiedler <[email protected]>
  • Loading branch information
igorwwwwwwwwwwwwwwwwwwww authored Sep 28, 2022
1 parent a4ea07f commit 5e84ea7
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions docs/operating/modify-objstore-data.md
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,31 @@ For example, the config file below specifies deletion for all series that match:
- matchers: '{__name__="k8s_app_metric1"}'
```
It is also possible to specify a time range in case you do not want to delete the matching series from the entire block. The interval is specified via millisecond timestamps `mint` and `maxt`.

```yaml
- matchers: '{__name__="k8s_app_metric1"}'
intervals:
- mint: 1663279200000
maxt: 1663292160000
```

For reference, you can convert the dates via GNU `date(1)`:

```shell
$ TZ=UTC date --date='2022-09-15 22:00:00' '+%s'
1663279200
$ TZ=UTC date --date='2022-09-16 01:36:00' '+%s'
1663292160
$ TZ=UTC date -d @1663279200 --iso=seconds
2022-09-15T22:00:00+00:00
$ TZ=UTC date -d @1663292160 --iso=seconds
2022-09-16T01:36:00+00:00
```

## Relabel series

```shell
Expand Down

0 comments on commit 5e84ea7

Please sign in to comment.