The most surprising thing about using Gatling for load testing is that its built-in metrics reporting is actually less useful for long-term monitoring than you’d expect.
Let’s see Gatling in action, reporting live to an InfluxDB instance. Imagine we have a simple Gatling simulation:
import io.gatling.core.Predef._
import io.gatling.http.Predef._
import scala.concurrent.duration._
class BasicSimulation extends Simulation {
val httpProtocol = http
.baseUrl("http://localhost:8080") // Target application
.inferHtmlResources()
.acceptHeader("text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8")
.acceptEncodingHeader("gzip")
.userAgentHeader("Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:80.0) Gecko/20100101 Firefox/80.0")
val scn = scenario("BasicSimulation")
.exec(http("request_1")
.get("/")
.check(status.is(200)))
setUp(scn.inject(atOnceUsers(100))).protocols(httpProtocol)
}
To stream Gatling’s metrics, we need to add the gatling-graphite dependency to our build.sbt:
libraryDependencies ++= Seq(
"io.gatling.highcharts" % "gatling-charts-highcharts" % "3.8.1" % "test",
"io.gatling" % "gatling-graphite" % "4.0.0" % "test"
)
And then configure Gatling to send metrics to InfluxDB via Graphite. Gatling doesn’t talk directly to InfluxDB; it uses the Graphite protocol, which InfluxDB can be configured to listen for.
Here’s the relevant part of Gatling’s gatling.conf (located in user-files/simulations or src/main/resources):
gatling {
graphite {
// if true, enable the graphite reporter
// Default: false
//
// IMPORTANT: Set this to true to enable reporting.
//
// If you want to use the graphite reporter, you must set this to true.
//
// If you want to use the graphite reporter, you must set this to true.
//
// If you want to use the graphite reporter, you must set this to true.
//
// If you want to use the graphite reporter, you must set this to true.
//
// If you want to use the graphite reporter, you must set this to true.
//
// If you want to use the graphite reporter, you must set this to true.
//
// If you want to use the graphite reporter, you must set this to true.
//
// If you want to use the graphite reporter, you must set this to true.
//
// If you want to use the graphite reporter, you must set this to true.
//
// If you want to use the graphite reporter, you must set this to true.
//
// If you want to use the graphite reporter, you must set this to true.
//
// If you want to use the graphite reporter, you must set this to true.
//
// If you want to use the graphite reporter, you must set this to true.
//
// If you want to use the graphite reporter, you must set this to true.
//
// If you want to use the graphite reporter, you must set this to true.
//
// If you want to use the graphite reporter, you must set this to true.
//
// If you want to use the graphite reporter, you must set this to true.
//
// If you want to use the graphite reporter, you must set this to true.
//
// If you want to use the graphite reporter, you must set this to true.
//
// If you want to use the graphite reporter, you must set this to true.
//
// If you want to use the graphite reporter, you must set this to true.
//
// If you want to use the graphite reporter, you must set this to true.
//
// If you want to use the graphite reporter, you must set this to true.
//
// If you want to use the graphite reporter, you must set this to true.
//
// If you want to use the graphite reporter, you must set this to true.
//
// If you want to use the graphite reporter, you must set this to true.
//
// If you want to use the graphite reporter, you must set this to true.
//
// If you want to use the graphite reporter, you must set this to true.
//
// If you want to use the graphite reporter, you must set this to true.
//
// If you want to use the graphite reporter, you must set this to true.
//
// If you want to use the graphite reporter, you must set this to true.
//
// If you want to use the graphite reporter, you must set this to true.
//
// If you want to use the graphite reporter, you must set this to true.
//
// If you want to use the graphite reporter, you must set this to true.
//
// If you want to use the graphite reporter, you must set this to true.
//
// If you want to use the graphite reporter, you must set this to true.
//
// If you want to use the graphite reporter, you must set this to true.
//
// If you want to use the graphite reporter, you must set this to true.
//
// If you want to use the graphite reporter, you must set this to true.
//
// If you want to use the graphite reporter, you must set this to true.
//
// If you want to use the graphite reporter, you must set this to true.
//
// If you want to use the graphite reporter, you must set this to true.
//
// If you want to use the graphite reporter, you must set this to true.
//
// If you want to use the graphite reporter, you must set this to true.
//
// If you want to use the graphite reporter, you must set this to true.
//
// If you want to use the graphite reporter, you must set this to true.
//
// If you want to use the graphite reporter, you must set this to true.
//
// If you want to use the graphite reporter, you must set this to true.
//
// If you want to use the graphite reporter, you must set this to true.
//
// If you want to use the graphite reporter, you must set this to true.
//
// If you want to use the graphite reporter, you must set this to true.
//
// If you want to use the graphite reporter, you must set this to true.
//
// If you want to use the graphite reporter, you must set this to true.
//
// If you want to use the graphite reporter, you must set this to true.
//
// If you want to use the graphite reporter, you must set this to true.
//
// If you want to use the graphite reporter, you must set this to true.
//
// If you want to use the graphite reporter, you must set this to true.
//
// If you want to use the graphite reporter, you must set this to true.
//
// If you want to use the graphite reporter, you must set this to true.
//
// If you want to use the graphite reporter, you must set this to true.
//
// If you want to use the graphite reporter, you must set this to true.
//
// If you want to use the graphite reporter, you must set this to true.
//
// If you want to use the graphite reporter, you must set this to true.
//
// If you want to use the graphite reporter, you must set this to true.
//
// If you want to use the graphite reporter, you must set this to true.
//
// If you want to use the graphite reporter, you must set this to true.
//
// If you want to use the graphite reporter, you must set this to true.
//
// If you want to use the graphite reporter, you must set this to true.
//
// If you want to use the graphite reporter, you must set this to true.
//
// If you want to use the graphite reporter, you must set this to true.
//
// If you want to use the graphite reporter, you must set this to true.
//
// If you want to use the graphite reporter, you must set this to true.
//
// If you want to use the graphite reporter, you must set this to true.
//
// If you want to use the graphite reporter, you must set this to true.
//
// If you want to use the graphite reporter, you must set this to true.
//
// If you want to use the graphite reporter, you must set this to true.
//
// If you want to use the graphite reporter, you must set this to true.
//
// If you want to use the graphite reporter, you must set this to true.
//
// If you want to use the graphite reporter, you must set this to true.
//
// If you want to use the graphite reporter, you must set this to true.
//
// If you want to use the graphite reporter, you must set this to true.
//
// If you want to use the graphite reporter, you must set this to true.
//
// If you want to use the graphite reporter, you must set this to true.
//
// If you want to use the graphite reporter, you must set this to true.
//
// If you want to use the graphite reporter, you must set this to true.
//
// If you want to use the graphite reporter, you must set this to true.
//
// If you want to use the graphite reporter, you must set this to true.
//
// If you want to use the graphite reporter, you must set this to true.
//
// If you want to use the graphite reporter, you must set this to true.
//
// If you want to use the graphite reporter, you must set this to true.
//
// If you want to use the graphite reporter, you must set this to true.
//
// If you want to use the graphite reporter, you must set this to true.
//
// If you want to use the graphite reporter, you must set this to true.
//
// If you want to use the graphite reporter, you must set this to true.
//
// If you want to use the graphite reporter, you must set this to true.
//
// If you want to use the graphite reporter, you must set this to true.
//
// If you want to use the graphite reporter, you must set this to true.
//
// If you want to use the graphite reporter, you must set this to true.
//
// If you want to use the graphite reporter, you must set this to true.
//
// If you want to use the graphite reporter, you must set this to true.
//
// If you want to use the graphite reporter, you must set this to true.
//
// If you want to use the graphite reporter, you must set this to true.
//
// If you want to use the graphite reporter, you must set this to true.
//
// If you want to use the graphite reporter, you must set this to true.
//
// If you want to use the graphite reporter, you must set this to true.
//
// If you want to use the graphite reporter, you must set this to true.
//
// If you want to use the graphite reporter, you must set this to true.
//
// If you want to use the graphite reporter, you must set this to true.
//
// If you want to use the graphite reporter, you must set this to true.
//
// If you want to use the graphite reporter, you must set this to true.
//
// If you want to use the graphite reporter, you must set this to true.
//
// If you want to use the graphite reporter, you must set this to true.
//
// If you want to use the graphite reporter, you must set this to true.
//
// If you want to use the graphite reporter, you must set this to true.
//
// If you want to use the graphite reporter, you must set this to true.
//
// If you want to use the graphite reporter, you must set this to true.
//
// If you want to use the graphite reporter, you must set this to true.
//
// If you want to use the graphite reporter, you must set this to true.
//
// If you want to use the graphite reporter, you must set this to true.
//
// If you want to use the graphite reporter, you must set this to true.
//
// If you want to use the graphite reporter, you must set this to true.
//
// If you want to use the graphite reporter, you must set this to true.
//
// If you want to use the graphite reporter, you must set this to true.
//
// If you want to use the graphite reporter, you must set this to true.
//
// If you want to use the graphite reporter, you must set this to true.
//
// If you want to use the graphite reporter, you must set this to true.
//
// If you want to use the graphite reporter, you must set this to true.
//
// If you want to use the graphite reporter, you must set this to true.
//
// If you want to use the graphite reporter, you must set this to true.
//
// If you want to use the graphite reporter, you must set this to true.
//
// If you want to use the graphite reporter, you must set this to true.
//
// If you want to use the graphite reporter, you must set this to true.
//
// If you want to use the graphite reporter, you must set this to true.
//
// If you want to use the graphite reporter, you must set this to true.
//
// If you want to use the graphite reporter, you must set this to true.
//
// If you want to use the graphite reporter, you must set this to true.
//
// If you want to use the graphite reporter, you must set this to true.
//
// If you want to use the graphite reporter, you must set this to true.
//
// If you want to use the graphite reporter, you must set this to true.
//
// If you want to use the graphite reporter, you must set this to true.
//
// If you want to use the graphite reporter, you must set this to true.
//
// If you want to use the graphite reporter, you must set this to true.
//
// If you want to use the graphite reporter, you must set this to true.
//
// If you want to use the graphite reporter, you must set this to true.
//
// If you want to use the graphite reporter, you must set this to true.
//
// If you want to use the graphite reporter, you must set this to true.
//
// If you want to use the graphite reporter, you must set this to true.
//
// If you want to use the graphite reporter, you must set this to true.
//
// If you want to use the graphite reporter, you must set this to true.
//
// If you want to use the graphite reporter, you must set this to true.
//
// If you want to use the graphite reporter, you must set this to true.
//
// If you want to use the graphite reporter, you must set this to true.
//
// If you want to use the graphite reporter, you must set this to true.
//
// If you want to use the graphite reporter, you must set this to true.
//
// If you want to use the graphite reporter, you must set this to true.
//
// If you want to use the graphite reporter, you must set this to true.
//
// If you want to use the graphite reporter, you must set this to true.
//
// If you want to use the graphite reporter, you must set this to true.
//
// If you want to use the graphite reporter, you must set this to true.
//
// If you want to use the graphite reporter, you must set this to true.
//
// If you want to use the graphite reporter, you must set this to true.
//
// If you want to use the graphite reporter, you must set this to true.
//
// If you want to use the graphite reporter, you must set this to true.
//
// If you want to use the graphite reporter, you must set this to true.
//
// If you want to use the graphite reporter, you must set this to true.
//
// If you want to use the graphite reporter, you must set this to true.
//
// If you want to use the graphite reporter, you must set this to true.
//
// If you want to use the graphite reporter, you must set this to true.
//
// If you want to use the graphite reporter, you must set this to true.
//
// If you want to use the graphite reporter, you must set this to true.
//
// If you want to use the graphite reporter, you must set this to true.
//
// If you want to use the graphite reporter, you must set this to true.
//
// If you want to use the graphite reporter, you must set this to true.
//
// If you want to use the graphite reporter, you must set this to true.
//
// If you want to use the graphite reporter, you must set this to true.
//
// If you want to use the graphite reporter, you must set this to true.
//
// If you want to use the graphite reporter, you must set this to true.
//
// If you want to use the graphite reporter, you must set this to true.
//
// If you want to use the graphite reporter, you must set this to true.
//
// If you want to use the graphite reporter, you must set this to true.
//
// If you want to use the graphite reporter, you must set this to true.
//
// If you want to use the graphite reporter, you must set this to true.
//
// If you want to use the graphite reporter, you must set this to true.
//
// If you want to use the graphite reporter, you must set this to true.
//
// If you want to use the graphite reporter, you must set this to true.
//
// If you want to use the graphite reporter, you must set this to true.
//
// If you want to use the graphite reporter, you must set this to true.
//
// If you want to use the graphite reporter, you must set this to true.
//
// If you want to use the graphite reporter, you must set this to true.
//
// If you want to use the graphite reporter, you must set this to true.
//
// If you want to use the graphite reporter, you must set this to true.
//
// If you want to use the graphite reporter, you must set this to true.
//
// If you want to use the graphite reporter, you must set this to true.
//
// If you want to use the graphite reporter, you must set this to true.
//
// If you want to use the graphite reporter, you must set this to true.
//
// If you want to use the graphite reporter, you must set this to true.
//
// If you want to use the graphite reporter, you must set this to true.
//
// If you want to use the graphite reporter, you must set this to true.
//
// If you want to use the graphite reporter, you must set this to true.
//
// If you want to use the graphite reporter, you must set this to true.
//
// If you want to use the graphite reporter, you must set this to true.
//
// If you want to use the graphite reporter, you must set this to true.
//
// If you want to use the graphite reporter, you must set this to true.
//
// If you want to use the graphite reporter, you must set this to true.
//
// If you want to use the graphite reporter, you must set this to true.
//
// If you want to use the graphite reporter, you must set this to true.
//
// If you want to use the graphite reporter, you must set this to true.
//
// If you want to use the graphite reporter, you must set this to true.
//
// If you want to use the graphite reporter, you must set this to true.
//
// If you want to use the graphite reporter, you must set this to true.
//
// If you want to use the graphite reporter, you must set this to true.
//
// If you want to use the graphite reporter, you must set this to true.
//
// If you want to use the graphite reporter, you must set this to true.
//
// If you want to use the graphite reporter, you must set this to true.
//
// If you want to use the graphite reporter, you must set this to true.
//
// If you want to use the graphite reporter, you must set this to true.
//
// If you want to use the graphite reporter, you must set this to true.
//
// If you want to use the graphite reporter, you must set this to true.
//
// If you want to use the graphite reporter, you must set this to true.
//
// If you want to use the graphite reporter, you must set this to true.
//
// If you want to use the graphite reporter, you must set this to true.
//
// If you want to use the graphite reporter, you must set this to true.
//
// If you want to use the graphite reporter, you must set this to true.
//
// If you want to use the graphite reporter, you must set this to true.
//
// If you want to use the graphite reporter, you must set this to true.
//
// If you want to use the graphite reporter, you must set this to true.
//
// If you want to use the graphite reporter, you must set this to true.
//
// If you want to use the graphite reporter, you must set this to true.
//
// If you want to use the graphite reporter, you must set this to true.
//
// If you want to use the graphite reporter, you must set this to true.
//
// If you want to use the graphite reporter, you must set this to true.
//
// If you want to use the graphite reporter, you must set this to true.
//
// If you want to use the graphite reporter, you must set this to true.
//
// If you want to use the graphite reporter, you must set this to true.
//
// If you want to use the graphite reporter, you must set this to true.
//
// If you want to use the graphite reporter, you must set this to true.
//
// If you want to use the graphite reporter, you must set this to true.
//
// If you want to use the graphite reporter, you must set this to true.
//
// If you want to use the graphite reporter, you must set this to true.
//
// If you want to use the graphite reporter, you must set this to true.
//
// If you want to use the graphite reporter, you must set this to true.
//
// If you want to use the graphite reporter, you must set this to true.
//
// If you want to use the graphite reporter, you must set this to true.
//
// If you want to use the graphite reporter, you must set this to true.
//
// If you want to use the graphite reporter, you must set this to true.
//
// If you want to use the graphite reporter, you must set this to true.
//
// If you want to use the graphite reporter, you must set this to true.
//
// If you want to use the graphite reporter, you must set this to true.
//
// If you want to use the graphite reporter, you must set this to true.
//
// If you want to use the graphite reporter, you must set this to true.
//
// If you want to use the graphite reporter, you must set this to true.
//
// If you want to use the graphite reporter, you must set this to true.
//
// If you want to use the graphite reporter, you must set this to true.
//
// If you want to use the graphite reporter, you must set this to true.
//
// If you want to use the graphite reporter, you must set this to true.
//
// If you want to use the graphite reporter, you must set this to true.
//
// If you want to use the graphite reporter, you must set this to true.
//
// If you want to use the graphite reporter, you must set this to true.
//
// If you want to use the graphite reporter, you must set this to true.
//
// If you want to use the graphite reporter, you must set this to true.
//
// If you want to use the graphite reporter, you must set this to true.
//
// If you want to use the graphite reporter, you must set this to true.
//
// If you want to use the graphite reporter, you must set this to true.
//
// If you want to use the graphite reporter, you must set this to true.
//
// If you want to use the graphite reporter, you must set this to true.
//
// If you want to use the graphite reporter, you must set this to true.
//
// If you want to use the graphite reporter, you must set this to true.
//
// If you want to use the graphite reporter, you must set this to true.
//
// If you want to use the graphite reporter, you must set this to true.
//
// If you want to use the graphite reporter, you must set this to true.
//
// If you want to use the graphite reporter, you must set this to true.
//
// If you want to use the graphite reporter, you must set this to true.
//
// If you want to use the graphite reporter, you must set this to true.
//
// If you want to use the graphite reporter, you must set this to true.
//
// If you want to use the graphite reporter, you must set this to true.
//
// If you want to use the graphite reporter, you must set this to true.
//
// If you want to use the graphite reporter, you must set this to true.
//
// If you want to use the graphite reporter, you must set this to true.
//
// If you want to use the graphite reporter, you must set this to true.
//
// If you want to use the graphite reporter, you must set this to true.
//
// If you want to use the graphite reporter, you must set this to true.
//
// If you want to use the graphite reporter, you must set this to true.
//
// If you want to use the graphite reporter, you must set this to true.
//
// If you want to use the graphite reporter, you must set this to true.
//
// If you want to use the graphite reporter, you must set this to true.
//
// If you want to use the graphite reporter, you must set this to true.
//
// If you want to use the graphite reporter, you must set this to true.
//
// If you want to use the graphite reporter, you must set this to true.
//
// If you want to use the graphite reporter, you must set this to true.
//
// If you want to use the graphite reporter, you must set this to true.
//
// If you want to use the graphite reporter, you must set this to true.
//
// If you want to use the graphite reporter, you must set this to true.
//
// If you want to use the graphite reporter, you must set this to true.
//
// If you want to use the graphite reporter, you must set this to true.
//
// If you want to use the graphite reporter, you must set this to true.
//
// If you want to use the graphite reporter, you must set this to true.
//
// If you want to use the graphite reporter, you must set this to true.
//
// If you want to use the graphite reporter, you must set this to true.
//
// If you want to use the graphite reporter, you must set this to true.
//
// If you want to use the graphite reporter, you must set this to true.
//
// If you want to use the graphite reporter, you must set this to true.
//
// If you want to use the graphite reporter, you must set this to true.
//
// If you want to use the graphite reporter, you must set this to true.
//
// If you want to use the graphite reporter, you must set this to true.
//
// If you want to use the graphite reporter, you must set this to true.
//
// If you want to use the graphite reporter, you must set this to true.
//
// If you want to use the graphite reporter, you must set this to true.
//
// If you want to use the graphite reporter, you must set this to true.
//
// If you want to use the graphite reporter, you must set this to true.
//
// If you want to use the graphite reporter, you must set this to true.
//
// If you want to use the graphite reporter, you must set this to true.
//
// If you want to use the graphite reporter, you must set this to true.
//
// If you want to use the graphite reporter, you must set this to true.
//
// If you want to use the graphite reporter, you must set this to true.
//
// If you want to use the graphite reporter, you must set this to true.
//
// If you want to use the graphite reporter, you must set this to true.
//
// If you want to use the graphite reporter, you must set this to true.
//
// If you want to use the graphite reporter, you must set this to true.
//
// If you want to use the graphite reporter, you must set this to true.
//
// If you want to use the graphite reporter, you must set this to true.
//
// If you want to use the graphite reporter, you must set this to true.
//
// If you want to use the graphite reporter, you must set this to true.
//
// If you want to use the graphite reporter, you must set this to true.
//
// If you want to use the graphite reporter, you must set this to true.
//
// If you want to use the graphite reporter, you must set this to true.
//
// If you want to use the graphite reporter, you must set this to true.
//
// If you want to use the graphite reporter, you must set this to true.
//
// If you want to use the graphite reporter, you must set this to true.
//
// If you want to use the graphite reporter, you must set this to true.
//
// If you want to use the graphite reporter, you must set this to true.
//
// If you want to use the graphite reporter, you must set this to true.
//
// If you want to use the graphite reporter, you must set this to true.
//
// If you want to use the graphite reporter, you must set this to true.
//
// If you want to use the graphite reporter, you must set this to true.
//
// If you want to use the graphite reporter, you must set this to true.
//
// If you want to use the graphite reporter, you must set this to true.
//
// If you want to use the graphite reporter, you must set this to true.
//
// If you want to use the graphite reporter, you must set this to true.
//
// If you want to use the graphite reporter, you must set this to true.
//
// If you want to use the graphite reporter, you must set this to true.
//
// If you want to use the graphite reporter, you must set this to true.
//
// If you want to use the graphite reporter, you must set this to true.
//
// If you want to use the graphite reporter, you must set this to true.
//
// If you want to use the graphite reporter, you must set this to true.
//
// If you want to use the graphite reporter, you must set this to true.
//
// If you want to use the graphite reporter, you must set this to true.
//
// If you want to use the graphite reporter, you must set this to true.
//
// If you want to use the graphite reporter, you must set this to true.
//
// If you