Author: milamber Date: Wed Mar 4 08:44:18 2015 New Revision: 1663890 URL: http://svn.apache.org/r1663890 Log: Add the new realtime-results.html page under svn control Added: jmeter/trunk/docs/usermanual/realtime-results.html (with props) Added: jmeter/trunk/docs/usermanual/realtime-results.html URL: http://svn.apache.org/viewvc/jmeter/trunk/docs/usermanual/realtime-results.html?rev=1663890&view=auto ============================================================================== --- jmeter/trunk/docs/usermanual/realtime-results.html (added) +++ jmeter/trunk/docs/usermanual/realtime-results.html Wed Mar 4 08:44:18 2015 @@ -0,0 +1,813 @@ + + + + + + + + + + + + + + +Apache JMeter - User's Manual: Live Statistics + + + + + + + +
+ + + + + +
+ + +      +Apache JMeter +
+
+ + + + + +
Tweet + + Follow + +
+
+ + + + + + + + + + + +
+
+
+ + + +
+

About

+ +

Download

+ +

Documentation

+ +

Tutorials (PDF format)

+ +

Community

+ +

Foundation

+ +
+ +
+
+ + + + + + +
+ + + + + +
+
+ + + + +
+ +17. Real-time results +
+
+

+Since JMeter 2.13 you can get realtime results sent to a backend through the + + +Backend Listener + + using potentially any backend (JDBC, JMS, Webservice...) implementing + +AbstractBackendListenerClient + +. +
+ + +JMeter ships with a GraphiteBackendListenerClient which allows you to send metrics to a Graphite Backend. +
+ + +This feature provides: + +

    + + +
  • +Live results +
  • + + +
  • +Nice graphs for metrics +
  • + + +
  • +Ability to compare 2 or more load tests +
  • + + +
  • +Having monitoring data as long as JMeter results in the same backend +
  • + + +
  • +... +
  • + + +
+ +In this document we will present the configuration setup to be able to graph and historize the data in 3 different backends: + +
    + + +
  • +InfluxDB +
  • + + +
  • +CollectD +
  • + + +
  • +Graphite +
  • + + +
+ + +

+ + + + +
+ +17.1 Metrics exposed + +
+
+ + + + +
+ +17.1.1 Thread/Virtual Users metrics + +
+
+

+ + Threads metrics are the following: + +

+ + + + + + + + + + + + + + + + + + + + + + + + + +
+ +Metric Name + + + +Description + +
+ +<rootMetricsPrefix>.cumulated.minActiveThreads + + + +Min active threads + +
+ +<rootMetricsPrefix>.cumulated.maxActiveThreads + + + +Max active threads + +
+ +<rootMetricsPrefix>.cumulated.meanActiveThreads + + + +Mean active threads + +
+ +<rootMetricsPrefix>.cumulated.startedThreads + + + +Started threads + +
+ +<rootMetricsPrefix>.cumulated.stoppedThreads + + + +Finished threads + +
+
+

+ + + + +
+ +17.1.2 Response times metrics + +
+
+

+Response times metrics are the following: +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +Metric Name + + + +Description + +
+ +<rootMetricsPrefix>.<samplerName>.success + + + +Number of successful responses for sampler name + +
+ +<rootMetricsPrefix>.<samplerName>.failure + + + +Number of failed responses for sampler name + +
+ +<rootMetricsPrefix>.<samplerName>.total + + + +Total number of requests for sampler name + +
+ +<rootMetricsPrefix>.<samplerName>.min + + + +Min response time for sampler name + +
+ +<rootMetricsPrefix>.<samplerName>.max + + + +Max response time for sampler name + +
+ +<rootMetricsPrefix>.<samplerName>.percentile<percentileValue> + + + +Percentile computed for successful responses of sampler name. You can input as many percentiles as you want (3 or 4 being a reasonable value).
+ By default listener computes percentiles 90%, 95% and 99% +
+
+

+ + By default JMeter sends only metrics for all samplers using "__cumulated__" as samplerName. + +

+
+

+
+

+ + + + +
+ +17.2 JMeter configuration + +
+
+

+ + To make JMeter send metrics to backend add a + +BackendListener + + using the GraphiteBackendListenerClient. + +

+


+Graphite configuration +

+
+

+ + + + +
+ +17.2 InfluxDB + +
+
+

+InfluxDB is an open-source, distributed,time-series database that allows to +easily store metrics. +Installation and configuration is very easy, read this for more details + +InfluxDB documentation + +. +
+ + +InfluxDB data can be easily viewed in a browser through either + +Influga + + or + +Grafana + +. +We will use Grafana in this case. + +

+ + + + +
+ +17.2.1 InfluxDB graphite listener configuration + +
+
+

+To enable Graphite listener in InfluxDB, edit files /opt/influxdb/shared/config.toml or /usr/local/etc/influxdb.conf, find "input_plugins.graphite" and set this: + +

+ + + # Configure the graphite api +
+ + + [input_plugins.graphite] +
+ + + enabled = true +
+ + + address = "0.0.0.0" # If not set, is actually set to bind-address. +
+ + + port = 2003 +
+ + + database = "jmeter" # store graphite data in this database +
+ + + # udp_enabled = true # enable udp interface on the same port as the tcp interface +
+ + + +
+
+

+ + + + +
+ +17.2.2 InfluxDB database configuration + +
+
+

+Connect to InfluxDB admin console and create 2 databases: + +

    + + +
  • +grafana : Used by Grafana to store the dashboards we will create +
  • + + +
  • +jmeter : Used by InfluxDB to store the data sent to Graphite Listener as per database="jmeter" config element in influxdb.conf or config.toml +
  • + + +
+ + +

+
+

+ + + + +
+ +17.2.3 Grafana configuration + +
+
+

+ + Installing grafana is just a matter of putting the unzipped bundle behind an Apache HTTP server. +
+ + + Read + +documentation + + for more details. + Open config.js file and find datasources element, and edit it like this: +
+ + + +

+ + + datasources: { +
+ + + influxdb: { +
+ + + type: 'influxdb', +
+ + + url: "http://localhost:8086/db/jmeter", +
+ + + username: 'root', +
+ + + password: 'root', +
+ + + }, + grafana: { +
+ + + type: 'influxdb', +
+ + + url: "http://localhost:8086/db/grafana", +
+ + + username: 'root', +
+ + + password: 'root', +
+ + + grafanaDB: true +
+ + + }, +
+ + + }, + +
+
+ +

+ + Note that grafana has "grafanaDB:true". Also note that here we use root user for simplicity, it is better to dedicate a special user with less rights. +
+ + + Here is the kind of dashboard that you could obtain: + +

+


+Grafana dashboard +

+
+

+
+

+ + + + +
+ +17.3 Collectd + +
+
+

+TODO. +

+
+

+ + + + +
+ +17.4 Graphite + +
+
+

+TODO. +

+
+

+
+

+

+
+ + + + + + +
+ + + + + +
+
+
+
+
+Copyright © 1999-2015, Apache Software Foundation +
+
+
+Apache, Apache JMeter, JMeter, the Apache feather, and the Apache JMeter logo are +trademarks of the Apache Software Foundation. + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Propchange: jmeter/trunk/docs/usermanual/realtime-results.html ------------------------------------------------------------------------------ svn:eol-style = native Propchange: jmeter/trunk/docs/usermanual/realtime-results.html ------------------------------------------------------------------------------ svn:mime-type = text/plain