/prometheus-playground

Turnkey sandbox projects demonstrating a wide variety of Prometheus use cases

Primary LanguageGoApache License 2.0Apache-2.0

The Prometheus Playground

This repo houses a variety of Docker-Compose-based "sandbox" projects showcasing the Prometheus monitoring system. All projects are "turnkey" and require just a single docker-compose up command to run.

Each sandbox project has a README with an explanation of the project, a docker-compose.yml configuration file for Docker Compose, and other necessary resources (config files, Dockerfiles, etc.). To run a project, navigate to the appropriate directory and run make run (which is just an alias for docker-compose up --build). This will run the project in the foreground. To run the project in detached mode, use make run-detached.

Prerequisites

In order to run the sandbox projects you'll need to install Docker and Docker Compose and have a Docker daemon running locally.

Projects

Directory Scenario
alertmanager Prometheus monitors a basic web service and notifies Alertmanager if the service is down; Alertmanager, in turns, notifies a web service via webhook
blackbox-exporter A BlackBox prober exporter probes a simple web service and provides probe-based metrics to Prometheus
cadvisor Prometheus scrapes cAdvisor-gathered metrics for several containers
federation Three Prometheus instances run together as a single federation
file-sd A Prometheus instance discovers a simple instrumented web service via file-based service discovery
go-app An instrumented Go application using the Prometheus Go client
haproxy Prometheus runs behind HAProxy, which acts as a reverse proxy and provides basic auth and TLS encryption
nginx Prometheus runs behind nginx, which acts as a reverse proxy and provides basic auth and TLS encryption
node-exporter Prometheus scrapes Linux host metrics from a Node Exporter
python-flask-app An instrumented Flask application demonstrating the Prometheus Python client