An easy to follow guide that will help you setup Gatling and visualize the results live with InfluxDB and Grafana.
InfluxDB:
brew install influxdb
Grafana:
brew install grafana/grafana/grafana
Gatling:
Zip Bundle Link
Since InfluxDB does not provide Windows .exe's, the source must be compiled from source from GitHub. This requires installing Go as well as Git
- Get Windows Git Exe from git-scm.com/downloads and run installer
- Add
git
to the windows path by runningSET %PATH% = %PATH%;C:\Program Files\Git\cmd
from Command Prompt - Ensure that git and your path are properly setup by running
git --version
from Command Prompt
- Get Windows Go Exe from https://golang.org/dl/ and run installer
- Go should by default be installed directly in
C:\Go
and accordingly update your PATH variable - If this is not the case, add Go to your path by running
SET %PATH% = %PATH%;C:\Go\bin
and place the Go distribution inC:\
- Create a
projects
directory underC:\Go\
and make sureGOPATH
is set toC:\Go\projects
Usually the rest should be pretty straight forward. You would run go get github.com/influxdb/influxdb
to get the latest, run some go install commands, and you would be on your happy way. However, at the time of putting together this Gatling/Influx/Grafana stack, the latest version of master on InfluxDB had a bug with a breaking change in one of its dependencies. I was unable to figure out a clean way to use go get
and specify a specific branch (and was clearly not the only person who ran into this issue with Influx), so I came up with a work around. Hold on to your seats:
-
Run
go get github.com/influxdb/influxdb
.
This will populate yourC:\Go\
directory with some stuff, and more importantly, will populateC:\Go\projects\src\github.com\influxdata
with a folder calledinfluxdb
. This folder is an exact copy of the master version of InfluxDB. -
Delete
influxdb
and in its place clone the 0.13 branch of InfluxDB.git clone -b 0.13 https://github.com/influxdata/influxdb.git
(At the time of writing this .13 was the latest stable version of InfluxDB and it also worked with the version of Grafana that I used) -
Everything else that resulted from
go get github.com/influxdb/influxdb
should be the same with the exception of us swapping the master source code with the .13 branch source code -
Make sure you are inside the the influxdb folder
cd C:\Go\projects\src\github.com\influxdata\influxdb
and run
go get -u -f ./...
and then
go build ./...
If all the stars in the universe aligned for you today, then you should have influxdb installed
The executables should be in
C:\Go\projects\bin\
Run
influxd.exe
(or update your PATH to include C:\Go\projects\bin\ and run influxd) and navigate to http://localhost:8083/. You should see the InfluxDB Web Interface
-
Copy the gatling-charts-highcharts-bundle-2.2.2 folder directly under your C drive (
C:\gatling-charts-highcharts-bundle
) -
Set
GATLING_HOME
toC:\gatling-charts-highcharts-bundle-2.2.2
-
Update your Path
set PATH=%PATH%;%GATLING_HOME%\bin
Download the Windows zip containing the exe from Grafana and run the installer