1. Arthur Lutz
  2. salt_graphite_grafana

Overview

HTTPS SSH

Salted Graphite and Grafana setup for Salt orchestrated monitoring

Demo of running active supervision orchestrated by salt by pushing metrics to graphite and viewing them in grafana.

Install

  • get https://github.com/jacksoncage/salt-docker
  • use docker-compose.yaml with it
  • docker exec -ti saltdocker_master_1 env TERM=xterm bash
  • salt \* state.highstate
  • (you may need to restart your docker instances to refresh salt-minion configuration since docker does not support systemd)

Screenshot

Screenshot.png

Optionnal

less verbose on the master

echo "\nstate_verbose: False" >> /etc/salt/master

install apt-cacher-ng on your docker host and set apt-cacher-ng proxy using

salt \* cmd.run "echo 'Acquire::http { Proxy \"http://10.1.1.1:3142\"; };' > /etc/apt/apt.conf.d/02proxy"

TODO

  • use environment variable for internal dsn (/etc/hosts) instead of scheduler and mine
  • get apache to serve graphite
  • better tests for idempotent states
  • orchestrator

Make some graphs move

Stress the frontal :

siege -c 100 -i http://localhost:9080/
ab -n 5000 -c 500 http://localhost:9080/

Stress the database :

root@db:/$ su postgres
postgres@db:/$ pgbench -i
postgres@db:/$ pgbench -c 10 -C -s 100 -F 100 -t 100

Burn a CPU in one of the hosts :

while :; do :; done