mirror of
https://github.com/prometheus/prometheus
synced 2024-12-23 15:04:13 +00:00
Add docs for backfill (#8230)
* Add docs for backfill Signed-off-by: aSquare14 <atibhi.a@gmail.com>
This commit is contained in:
parent
27a6e1e174
commit
c08009139a
@ -129,3 +129,21 @@ Note that on the read path, Prometheus only fetches raw series data for a set of
|
||||
### Existing integrations
|
||||
|
||||
To learn more about existing integrations with remote storage systems, see the [Integrations documentation](https://prometheus.io/docs/operating/integrations/#remote-endpoints-and-storage).
|
||||
|
||||
## Backfilling from OpenMetrics format
|
||||
|
||||
### Overview
|
||||
|
||||
If a user wants to create blocks into the TSDB from data that is in [OpenMetrics](https://openmetrics.io/) format, they can do so using backfilling. However, they should be careful and note that it is not safe to backfill data from the last 3 hours (the current head block) as this time range may overlap with the current head block Prometheus is still mutating. Backfilling will create new TSDB blocks, each containing two hours of metrics data. This limits the memory requirements of block creation. Compacting the two hour blocks into larger blocks is later done by the Prometheus server itself.
|
||||
|
||||
A typical use case is to migrate metrics data from a different monitoring system or time-series database to Prometheus. To do so, the user must first convert the source data into [OpenMetrics](https://openmetrics.io/) format, which is the input format for the backfilling as described below.
|
||||
|
||||
### Usage
|
||||
|
||||
Backfilling can be used via the Promtool command line. Promtool will write the blocks to a directory. By default this output directory is ./data/, you can change it by using the name of the desired output directory as an optional argument in the sub-command.
|
||||
|
||||
```
|
||||
promtool tsdb create-blocks-from openmetrics <input file> [<output directory>]
|
||||
```
|
||||
|
||||
After the creation of the blocks, move it to the data directory of Prometheus. If there is an overlap with the existing blocks in Prometheus, the flag `--storage.tsdb.allow-overlapping-blocks` needs to be set. Note that any backfilled data is subject to the retention configured for your Prometheus server (by time or size).
|
Loading…
Reference in New Issue
Block a user