Code Monkey home page Code Monkey logo

thanos-rule-syncer's Introduction

thanos-rule-syncer

Go Report Card

thanos-rule-syncer is a small process that can be run as a sidecar to synchronize Prometheus rules from multi-tenant APIs to the Thanos Ruler. It performs the following steps:

  1. It fetches the tenant's rules from the given --observatorium-api-url which should be the full URL including the path. If --rules-backend-url is specified, it gets priority over --observatorium-api-url.
  2. The rules are written to disk which should be the same folder that your Thanos Ruler can read rules from.
  3. Lastly, rules are synced with a POST request against $(--thanos-rule-url)/-/reload, reloading Thanos Ruler.

Usage

Usage of ./thanos-rule-syncer:
  -file string
    	The path to the file the rules are written to on disk so that Thanos Ruler can read it from. Required. (default "rules.yaml")
  -interval uint
    	The interval at which to poll the Observatorium API for updates to rules, given in seconds. (default 60)
  -observatorium-api-url string
    	The URL of the Observatorium API from which to fetch the rules. If specified, auth flags must also be provided.
  -observatorium-ca string
    	Path to a file containing the TLS CA against which to verify the Observatorium API. If no server CA is specified, the client will use the system certificates.
  -oidc.audience string
    	The audience for whom the access token is intended, see https://openid.net/specs/openid-connect-core-1_0.html#IDToken.
  -oidc.client-id string
    	The OIDC client ID, see https://tools.ietf.org/html/rfc6749#section-2.3.
  -oidc.client-secret string
    	The OIDC client secret, see https://tools.ietf.org/html/rfc6749#section-2.3.
  -oidc.issuer-url string
    	The OIDC issuer URL, see https://openid.net/specs/openid-connect-discovery-1_0.html#IssuerDiscovery.
  -rules-backend-url string
    	The URL of the Rules Storage Backend from which to fetch the rules. If specified, it gets priority over -observatorium-api-url and auth flags are no longer needed.
  -tenant string
    	The name of the tenant whose rules should be synced.
  -tenants-file string
    	The path to a file containing the list of tenants whose rules should be synced. There must be one tenant per line.
  -thanos-rule-url string
    	The URL of Thanos Ruler that is used to trigger reloads of rules. We will append /-/reload. Required.
  -web.internal.listen string
    	The address on which the internal server listens. (default ":8083")

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.