GithubHelp home page GithubHelp logo

anas-aso / thanos_downloader Goto Github PK

View Code? Open in Web Editor NEW
11.0 1.0 2.0 45 KB

A helper application to use Prometheus TSDB data blocks uploaded by Thanos Sidecar component with a vanilla Prometheus setup.

License: Apache License 2.0

Dockerfile 5.09% Go 94.91%
prometheus thanos monitoring prometheus-data

thanos_downloader's Introduction

Release Build Status Go Report Card

Thanos Downloader

A helper application to use Prometheus TSDB data blocks uploaded by Thanos Sidecar component with a vanilla Prometheus setup.

The goal of this project is to allow for a simple use of Thanos Sidecar as a backup service for Prometheus data, and be able to use that data with a vanilla Prometheus setup without the need for the remaining Thanos components.

Configuration

Thanos Downloader uses the same configuration format used by Thanos Sidecar (e.g https://thanos.io/storage.md/#gcs). The available configuration flags can be found as below :

$ thanos_downloader --help
usage: thanos_downloader --interval.start=INTERVAL.START --interval.end=INTERVAL.END [<flags>]

Flags:
  --help                            Show context-sensitive help (also try --help-long and --help-man).
  --data.path="prom_data"           target data directory path.
  --interval.start=INTERVAL.START   start time of the requested interval in Unix time format (seconds).
  --interval.end=INTERVAL.END       end time of the requested interval in Unix time format (seconds).
  --config.path="config.yaml"       path to the Thanos format config file.
  --version                         Show application version.

How does it work

  1. get list of blocks in the provided bucket
  2. filter all blocks that satisfies the requested time range
  3. get the block with the highest resolution and most samples count for each time interval. This is needed since the uploaded blocks might be overlapping due to Prometheus HA setups and/or Thanos downsampling.

Docker

The application is available as a docker image :

docker run --rm -it anasaso/thanos_downloader:latest --help

Examples

thanos_downloader's People

Contributors

anas-aso avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

itsx xixipangma

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.