prometheus-tsdb-parquet

command module
v0.0.0-...-8d50b08 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 4, 2023 License: Apache-2.0 Imports: 16 Imported by: 0

README

prometheus-tsdb-parquet

Export Prometheus TSDB files into parquet files

Build

run make / go build -o bin/prometheus-tsdb-dump .

Usage

Grab prometheus chunk from prometheus data directory.
example directory structure:

./chunks/000001
./chunks/000002
./chunks/000003
./index
./meta.json
./tombstones

Once you copied a prometheus chunk, run the following:

bin/prometheus-tsdb-dump \
    --block <path_to_chunk_dir> 
    --output <destination_directory>
    --shard-size <optional: Max number of series in a signle parquet file (default 3_000_000)

Parquet Schema

type Line struct {
	Labels          map[string]string
	NumberOfSamples int              
	Hash            string           
	MetricName      string           
	MinTimestamp    int64            
	MaxTimestamp    int64            
	MinValue        float64          
	MaxValue        float64          
	Size            int              
}

Credits

Inspired by https://github.com/ryotarai/prometheus-tsdb-dump

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL