Skip to content

tcauth/prometheus_utils

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

83 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

prometheus_utils

dump_index CLI

dump_index reads a Prometheus TSDB block index either from a local directory or directly from an S3 bucket and writes a CSV listing all metrics and which labels they use.

Build

go build ./cmd/dump_index

Usage

./dump_index --block.dir /path/to/blocks --block.id <block-id>
./dump_index --s3.bucket <bucket> --s3.prefix <prefix> --block.id <block-id>

By default the results are written under <working-dir>/<bucket>/<tenant>/<block>/<metric-name>/<output-filename>.<ext>. Use -ouput-filename to set the file name explicitly. If not provided a random 4 digit number is used.

Use -chunk-file-workers to control how many chunk files are processed in parallel. The existing -chunk-workers flag controls parallelism within each file.

Use --output-labels to add specific labels as columns in the CSV output. When --labels-json is set, an additional labels column containing all labels encoded as JSON is included (CSV only).

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published