tree: 6096198ce9d276ca7c3e0025c920fdc53165fb14 [path history] [tgz]
  1. grafana/
  2. postgres/
  3. prometheus/
  4. src/
  5. sync/
  6. apply_configmaps.sh
  7. beam-grafana-etcdata-persistentvolumeclaim.yaml
  8. beam-grafana-libdata-persistentvolumeclaim.yaml
  9. beam-grafana-logdata-persistentvolumeclaim.yaml
  10. beam-postgresql-data-persistentvolumeclaim.yaml
  11. beamgrafana-deploy.yaml
  12. beamprometheus-deploy.yaml
  13. build.gradle
  14. build_and_publish_containers.sh
  15. docker-compose.yml
  16. OWNERS
  17. README.md
.test-infra/metrics/README.md

BeamMonitoring

This folder contains resources required to deploy the Beam metrics stack. There are two types of metrics in Beam project:

  • Community metrics
  • Metrics published by tests (IO Performance tests, Load tests and Nexmark tests)

Both types of metrics are presented in Grafana dashboard available here.

Community metrics

This includes

  • Python scripts for ingesting data from sources (Jenkins, JIRA, GitHub)
  • Postgres analytics database
  • Grafana dashboarding UI

Test metrics

Beam uses Prometheus to store metrics published by tests running on Jenkins.

Prometheus stack consists of the following components

  • the main Prometheus server
  • Alertmanager
  • Pushgateway

Both stacks can be deployed on your local machine. All components run within Docker containers. These are composed together via docker-compose for local hosting, and Kubernetes for the production instance on GCP.

Local setup

Docker Compose is used to host the full metrics stack on your local machine.

# Remove old docker
sudo apt-get remove docker docker-engine docker.io

# Install docker
sudo apt-get update
sudo apt-get install \
     apt-transport-https \
     ca-certificates \
     curl \
     gnupg2 \
     software-properties-common
curl -fsSL https://download.docker.com/linux/debian/gpg | sudo apt-key add -
sudo apt-key fingerprint 0EBFCD88
sudo add-apt-repository \
   "deb [arch=amd64] https://download.docker.com/linux/debian \
   $(lsb_release -cs) \
   stable"
sudo apt-get update
sudo apt-get install docker-ce

###################################################
# Commands below here required to spin up docker  #
# containers locally. Can be omitted for kuberctl #
# setup.                                          #
###################################################

# Install docker-compose
sudo curl -L https://github.com/docker/compose/releases/download/1.22.0/docker-compose-$(uname -s)-$(uname -m) -o /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose


# start docker service if it is not running already
sudo service docker start

# Build images required for spinning up docker-compose
# related containers.
docker-compose build

# Spinup docker-compose related containers.
docker-compose up

After running these commands, you can access the services running on your local machine:

If you're deploying for the first time on your machine, follow the wiki instructions on how to manually configure Grafana.

Grafana, Postgres and Prometheus containers persist data to Docker volumes, which will be restored on subsequent runs. To start from a clean state, you must also wipe out these volumes. (List volumes via docker volume ls)

Kubernetes setup

Kubernetes deployment instructions are maintained in the wiki: