Detailed tutorial on building a JMeter+Grafana+Influxdb monitoring platform with Docker

Detailed tutorial on building a JMeter+Grafana+Influxdb monitoring platform with Docker

We all know that Jmeter provides native result viewing. Since there is a native result viewing tool, why do we need to use other tools to view it? In addition to the rich viewing content, there are also the main reasons:
The result viewing plug-in provided by Jmeter itself consumes a lot of performance, so it should be disabled in formal stress testing. However, we need to view the results in real time while the script is running, so we need to use external tools to achieve this.
In addition, during the actual stress testing process, it should be noted that the Jmeter graphical mode is only suitable for debugging and should not be used for stress testing. The graphical stress testing method consumes more client performance and is prone to memory overflow due to client problems during the stress testing process. The official also gave tips to execute through the command line. Execute the command:

jmeter -n -t [jmx file] -l [results file] -e -o [Path to web report folder]

-n means running JMeter in non-GUI mode;

-t indicates the JMeter test script file to be run, usually a file ending with jmx;

-l indicates the file where the results are recorded, which ends with jtl by default; -e indicates that a test report will be generated after the test is completed;

-o specifies the location of the generated result folder.

Implementation principle

Next, we will explain in detail how to use InfluxDB and Grafana with the help of Docker to build a performance visualization monitoring platform.
InfluxDB concept: InfluxDB is an open source distributed time series, event, and indicator database written in Go language, without external dependencies. The database is now mainly used to store large amounts of time-stamped data, such as DevOps monitoring data, APP metrics, loT sensor data, and real-time analysis data.
InfluxDB conceptual features:

  • Unstructured (schemaless): can be any number of columns;
  • You can set the metric storage time;
  • Supports time-related functions (such as min, max, sum, count, mean, median, etc.) to facilitate statistics;
  • Support storage policy: can be used for data deletion and modification. (influxDB does not provide methods for deleting and modifying data);
  • Support continuous query: a set of statements that are automatically started in the database at a fixed time. When used with storage strategies, it can reduce the system usage of InfluxDB.
  • Native HTTP support, built-in HTTP API;
  • Support sql-like syntax;
  • Supports setting the number of copies of data in the cluster;
  • Supports periodic sampling of data and writing it to another measurement, making it easier to store data at different granularities.

Grafana concept : An open source software with rich indicator dashboards and graphic editors, suitable for Graphite, Elasticsearch, OpenTSDB, Prometheus, and InfluxDB. To put it simply, it is an open source WEB visualization platform.

JMeter introduces Backend Listener to send statistical indicator data to the Influxdb database in real time during the stress test. The Grafana (open source WEB visual dashboard) data source is connected to Influxdb to create a visual dashboard and obtain test indicator data in real time.

Install InfluxDB

Install and pull the influxdb image under docker: docker pull influxdb
Run the influxdb container: docker run --name my_influxdb -p 8086:8086 influxdb

Enter the container: docker exec -it container id /bin/bash

Create database jmeter

influx
show databases;
create database jmeter;
show databases;
use jmeter;
select * from jmeter;
exit;

Install Grafana

Pull the grafana image: docker pull grafana/grafana

Run the container: docker run --name my_grafana -p 3000:3000 grafana/grafana

Access grafana: http://ip:3000

The username and password are both "admin"

Add a database after entering

Configure the database after entering

Save and test

Configure display template

There are many templates, you can preview them and choose the appropriate one to download. Download address: https://grafana.com/grafana/dashboards

Download json file

Prepare to import

Just import the downloaded json file.

After the settings are completed, enter the panel

Here you can set the refresh rate

Configure Jmeter

Create Jmeter script.

Setting up the backend listener

You can view the results after running the script

This is the end of this article about building a JMeter+Grafana+Influxdb monitoring platform with Docker. For more information about building a JMeter+Grafana+Influxdb monitoring platform with Docker, please search for previous articles on 123WORDPRESS.COM or continue to browse the following related articles. I hope you will support 123WORDPRESS.COM in the future!

You may also be interested in:
  • Detailed explanation of performance monitoring of MySQL server using Prometheus and Grafana
  • Detailed tutorial on grafana installation and usage
  • Use Grafana to display monitoring charts of Docker containers and set email alert rules (illustration)
  • Detailed explanation of the tutorial on monitoring Springboot applications using Prometheus+Grafana
  • Use Grafana+Prometheus to monitor MySQL service performance
  • Detailed explanation of the process of building Prometheus+Grafana based on docker
  • Summary of influx+grafana custom python data collection and some pitfalls
  • Detailed steps for SpringBoot+Prometheus+Grafana to implement application monitoring and alarm
  • How to install grafana and add influxdb monitoring under Linux
  • Analyze the method of prometheus+grafana monitoring nginx
  • Prometheus monitors MySQL using grafana display
  • How to monitor Docker using Grafana on Ubuntu
  • Tutorial on building a JMeter+Grafana+influxdb visual performance monitoring platform in docker environment
  • Deploy grafana+prometheus configuration using docker
  • ELK and Grafana jointly create visual monitoring to analyze nginx logs
  • It doesn’t matter if you forget your Grafana password. 2 ways to reset your Grafana admin password

<<:  CSS Problems with Using Position:fixed and Margin-top Together on Same-Level Elements

>>:  Mysql desktop tool SQLyog resources and activation methods say goodbye to the black and white command line

Recommend

Solution to win10 without Hyper-V

Are you still looking for a way to enable Hyper-v...

4 Practical Tips for Web Page Design

Related articles: 9 practical tips for creating we...

Detailed description of shallow copy and deep copy in js

Table of contents 1. js memory 2. Assignment 3. S...

Solution to the problem of adaptive height and width of css display table

Definition and Usage The display property specifi...

Vue code highlighting plug-in comprehensive comparison and evaluation

Table of contents Comprehensive comparison From t...

MySQL installation tutorial under Linux centos7 environment

Detailed introduction to the steps of installing ...

MySql 5.6.35 winx64 installation detailed tutorial

Note: There was no error in the project startup d...

MySQL statement execution order and writing order example analysis

The complete syntax of the select statement is: S...

MySQL 5.7.18 winx64 installation and configuration method graphic tutorial

The installation of compressed packages has chang...

Implementation of CSS border length control function

In the past, when I needed the border length to b...

How to open the port in Centos7

The default firewall of CentOS7 is not iptables, ...

Is it true that the simpler the web design style, the better?

Original address: http://www.webdesignfromscratch...