github.com/abayer/test-infra@v0.0.5/velodrome/grafana-stack/README.md (about) 1 Overview 2 ======== 3 4 The goal of this directory is to set-up the following monitoring stack: 5 - InfluxDB as the Time-series Database 6 - Grafana as the front-end/display 7 - Prometheus as a different flavor of time-series database 8 - Nginx is used as a proxy (mostly to fix CORS issue) 9 10 Testing locally 11 =============== 12 13 You can set-up your own local grafana-stack easily, it doesn't have the same 14 constraints as production: No need to set-up a specific password or to go 15 through the `nginx` proxy. 16 17 You can run: 18 19 ``` 20 docker run -d -p 8083:8083 -p 8086:8086 tutum/influxdb:0.13 21 docker run -i -p 3000:3000 grafana/grafana 22 docker run -p 9090:9090 -v prom/prometheus 23 ``` 24 25 You then need to set-up the datasources/users into Grafana and InfluxDB as 26 described [below](#adding-data-source), and then import dashboards from 27 [dashboards/](dashboards/) directly through the web interface. 28 29 Step-by-step 30 ============ 31 32 First-time only 33 --------------- 34 Create the InfluxDB password: 35 ``` 36 kubectl create secret generic influxdb --from-literal=rootpassword="${influxdb_password}" 37 ``` 38 39 Password and database creation 40 ------------------------------ 41 42 Connect to the container and create the db: 43 44 ``` 45 $ kubectl exec -i -t influx-${PROJECT}-123456 -- influx -username root -password "${influxdb_password}" 46 > create database github 47 ``` 48 49 Adding data-source 50 ------------------ 51 52 Probably a first time only: 53 ``` 54 ./datasource.sh ${nginx_ip} ${grafana_password} 55 ```