GithubHelp home page GithubHelp logo

isabella232 / telemeter Goto Github PK

View Code? Open in Web Editor NEW

This project forked from openshift/telemeter

0.0 0.0 0.0 31.89 MB

Prometheus push federation

License: Apache License 2.0

Makefile 3.09% Go 75.51% Shell 3.74% Dockerfile 0.30% Jsonnet 16.93% Python 0.43%

telemeter's Introduction

Telemeter

Telemeter implements a Prometheus federation push client and server to allow isolated Prometheus instances that cannot be scraped from a central Prometheus to instead perform push federation to a central location.

  1. The local client scrapes /federate on a given Prometheus instance.
  2. The local client performs cleanup and anonymization and then pushes the metrics to the server.
  3. The server authenticates the client, validates and verifies that the metrics are "safe", and then ensures they have a label uniquely identifying the source client.
  4. The server holds the metrics in a local disk store until scraped.
  5. A centralized Prometheus scrapes each server instance and aggregates all the metrics.

Since that push is across security boundaries, the server must perform authentication, authorization, and data integrity checks as well as being resilient to denial of service.

Each client is uniquely identified by a cluster ID and all metrics federated are labelled with that ID.

Since Telemeter is dependent on Prometheus federation, each server instance must ensure that all metrics for a given cluster ID are routed to the same instance, otherwise Prometheus will mark those metrics series as stale. To do this, the server instances form a cluster using a secure gossip transport and build a consistent hash ring so that pushed client metrics are routed internally to the same server.

For resiliency, each server instance stores the received metrics on disk hashed by cluster ID until they are accessed by a federation endpoint.

note: Telemeter is alpha and may change significantly

Get started

To see this in action, run

make
./test/integration.sh http://localhost:9005

The command launches a two instance telemeter-server cluster and a single telemeter-client to talk to that server, along with a Prometheus instance running on http://localhost:9005 that shows the federated metrics. The client will scrape metrics from the local prometheus, then send those to the telemeter server cluster, which will then be scraped by that instance.

To run this test against another Prometheus server, change the URL (and if necessary, specify the bearer token necessary to talk to that server as the second argument).

To build binaries, run

make

To execute the unit test suite, run

make check

To launch a self contained integration test, run:

make test-integration

Adding new metrics to send via telemeter

Docs on the process on why and how to send these metrics are available here.

telemeter's People

Contributors

openshift-merge-robot avatar squat avatar metalmatze avatar s-urbaniak avatar smarterclayton avatar kakkoyun avatar brancz avatar paulfantom avatar lilic avatar jfchevrette avatar crawford avatar aditya-konarde avatar itdove avatar samuelstuchly avatar arilivigni avatar openshift-bot avatar simonpasquier avatar maorfr avatar jmelis avatar djwhatle avatar chambridge avatar anmolsachan avatar luciddreamz avatar awgreene avatar tiwillia avatar rporres avatar rafael-azevedo avatar mxinden avatar marun avatar krasi-georgiev avatar

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.