Home

Awesome

Prometheus monitoring demo site

Build Status License IRC

demo.do.prometheus.io

This repository provides a demo site for prometheus, alertmanager, prometheus exporters, and grafana. Site is provisioned with ansible running every day and on all commits to master branch. Everything is fully automated with travis ci pipeline. If you want to check ansible-playbook output, go to last build.

Have a look at configuration files in group_vars/.

Applications

All applications should be running on their default ports.

App nameAddress (HTTP)Address (HTTPS)
node_exporterdemo.do.prometheus.io:9100node.demo.do.prometheus.io
prometheusdemo.do.prometheus.io:9090prometheus.demo.do.prometheus.io
alertmanagerdemo.do.prometheus.io:9093alertmanager.demo.do.prometheus.io
grafanademo.do.prometheus.io:3000grafana.demo.do.prometheus.io

Important notice

Before running, golang is required to be installed on deployer machine (necessary to install random_exporter).

Most services can be accessed in two ways (links in Applications section. As an example, prometheus can be accessed via:

This workaround was needed to solve issue cloudalchemy/demo-site#13.

Run yourself

You can easily run such setup yourself without much knowledge how any part of this works. You just need to do two things:

Change ansible inventory

First of all you need to configure your inventory, ours is located in hosts file. Here you set up your target hosts by changing value of ansible_host variable. Also here you can exclude parts of this demo site, so if you don't need our website, you just remove this part:

[web]
demo

Accordingly you can exclude grafana, prometheus.

Change passwords

For security measures we encrypted some of our passwords, but it is easy to use yours! You can do it by replacing a file located at group_vars/grafana/vault with following content:

vault_grafana_password: <<INSERT_YOUR_GRAFANA_PASSWORD>>

Download the 'random' exporter binary

You will have to manually run go command to download & copy the random exporter binary to playbooks/files directory.

go get -u github.com/prometheus/client_golang/examples/random
cp <GOPATH>/bin/random /path/to/demo-site/playbooks/files/

Run as usual Ansible playbook

# Download roles
ansible-galaxy install -r roles/requirements.yml

# Run playbook
ansible-playbook site.yml
# or when using vault encrypted variables
ansible-playbook --vault-id @prompt site.yml

demo site is deployed using Cloud Alchemy ansible roles.

DigitalOcean