Git Product home page Git Product logo

isabella232 / prometheus-edge-hub Goto Github PK

View Code? Open in Web Editor NEW

This project forked from facebookarchive/prometheus-edge-hub

0.0 0.0 0.0 81 KB

Prometheus Edge Hub is a replacement of the Prometheus Pushgateway which allows for the pushing of metrics to an endpoint for scraping by prometheus, rather than having Prometheus scrape the metric sources directly.

License: MIT License

Dockerfile 1.76% Go 98.24%

prometheus-edge-hub's Introduction

Prometheus Edge Hub

Prometheus Edge Hub is a replacement of the Prometheus Pushgateway which allows for the pushing of metrics to an endpoint for scraping by prometheus, rather than having Prometheus scrape the metric sources directly. This differs from the Prometheus Pushgateway in several ways, the most important of which being that it does not overwrite timestamps and that metrics do not persist until updated. When the hub is scraped, all metrics are drained.

Usage

Setup Prometheus to scrape the hub just as you would any other scrape target.

Example configuration:

scrape_configs:
  - job_name: 'prometheus'
    static_configs:
      - targets: ['localhost:9090']

  - job_name: "edge-hub"
    honor_labels: true
    metric_relabel_configs:
      - regex: 'job'
        action: labeldrop
      - regex: 'instance'
        action: labeldrop
    static_configs:
      - targets: ['edge-hub:9091']'

Pushing Metrics

Pushing metrics to be scraped is as simple as making a post request to the /metrics endpoint containing a body with the metrics in Prometheus Text Exposition Format.

Debugging

To see the current state of the hub, make a GET request to /debug. This will return stats about the hub, such as how many metrics are stored in it. Use /debug?verbose to also see all of the metrics in the format that Prometheus would receive when scraping. Making a request to /debug does not remove the metrics from the hub.

Runtime Options

Customize how the edge hub is run with these command-line options.

Usage of ./cache.o:
  -limit int
        Limit the total metrics in the cache at one time. Will reject a push if cache is full. Default is -1 which is no limit. (default -1)
  -port string
        Port to listen for requests. Default is 9091 (default "9091")
  -scrapeTimeout int
        Timeout for scrape calls. Default is 10 (default 10)

Third-Party Code Disclaimer

Prometheus Edge Hub contains dependencies which are not maintained by the maintainers of this project. Please read the disclaimer at THIRD_PARTY_CODE_DISCLAIMER.md.

License

Prometheus Edge Hub is MIT License licensed, as found in the LICENSE file.

prometheus-edge-hub's People

Contributors

a8m avatar facebook-github-bot avatar guyko avatar idoshveki avatar scott8440 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.