GithubHelp home page GithubHelp logo

dschuan / prometheus-demo Goto Github PK

View Code? Open in Web Editor NEW

This project forked from chanzuckerberg/prometheus-demo

0.0 0.0 0.0 1.66 MB

Simulates monitoring HTTP microservice and short-lived job metrics

Home Page: https://prometheus.io

Makefile 2.08% Python 97.92%

prometheus-demo's Introduction

Prometheus Demo

This repo simulates monitoring HTTP microservices and short-lived batched jobs with Prometheus.

Grafana is deployed alongside Prometheus with sample dashboards for visualizing the data.

Setup

Before running any of the demonstrations below, you need to build the docker image for running the test kv_store and aggregator applications.

make image

To start the servers, use docker-compose.

docker-compose up

You will have to wait a few minutes before metrics start to appear on the dashboards described in the following sections.

Monitoring HTTP microservices

The docker-compose.yaml configuration sets up three instances of an HTTP key/value store microservice (similar to memcached).

  • The code that implements of the key/value store with prometheus instrumentation in kv_store.py.
  • The code that synthesizes traffic on these instances can be found in simulate_http_traffic.py.

The Grafana server is preconfigured with the dashboard for HTTP metrics shown below.

http dashboard!

Monitoring short-lived jobs

The docker-compose.yaml configuration sets up a metrics aggregator that short-lived jobs can send their metrics to.

  • The code that implements the metrics aggregator lives in aggregator.py.
  • The code that synthesizes batch job metrics is in simulate_jobs.py

The Grafana server is preconfigured with the dashboard job metrics shown below.

jobs dashboard!

Operating the servers

You will then have the following servers running.

You can check the metrics collection status of the kv_store servers on the Prometheus targets page.

On the grafana server there is a sample HTTP dashboard showing off some standard http metrics.

Teardown

Shut it down when you're done!

docker-compose down

prometheus-demo's People

Contributors

mweiden 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.