Install and configure the InfluxDBreference

Step1: Download the influxDB

cd /usr/local

Wget https://dl.influxdata.com/influxdb/releases/influxdb-1.7.0.x86_64.rpm - no - check - certificate

The RPM - the ivh influxdb - 1.7.0. X86_64. RPM

After the installation is complete, generate the default configuration file/etc/influxdb influxdb. Conf

Step2: modify the configuration file

vim /etc/influxdb/influxdb.conf

Enabled = true database = "jmeter" # database name retention policy = "" bind-address = ":2003" # port protocol = "TCP" consistency-level = "one"Copy the code

Modify the following information

[meta] dir = "/usr/local/influxdb/meta" [data] dir = "/usr/local/influxdb/data" # Store database metadata wal wal-dir = "/usr/local/ Influxdb /wal" # Store pre-write log files modify HTTP port information  [http] # Determines whether HTTP endpoint is enabled. enabled = true # The bind address used by the HTTP service. bind-address = ":8086"Copy the code

Step3: create a directory for storing data

mkdir /usr/local/influxdb

chown -R influxdb:influxdb /usr/local/influxdb

If you use other users, you need to switch to user root to change file permissions

Step4: Start the influxDB service

Boot method 1 :(recommended)

vim /etc/profile

Add variables: export INFLUXDB_CONFIG_PATH = / etc/influxdb influxdb. Conf

The source /etc/profile environment variable takes effect immediately

Influxd & start

The following figure shows the successful startup:

Startup Mode 2:

Influxd – config/etc/influxdb influxdb. Conf

Step5: Verify the successful startup

netstat -antp|grep 8088

The TCP port of influxDB is 8088. If the following information is displayed, the service is started successfully:

Step6: create a database

Run the following command

$ influx

> show databases

> CREATE DATABASE jmeter

> use jmeter

> create user "admin" with password '123456' with all privileges
Copy the code

The user name and password set here need to be recorded and will be used later when configuring JMeter and Grafana

Install and configure Grafanareference

Step1: download GrafanaThe website address

cd /usr/local

Wget HTTP: / / https://dl.grafana.com/oss/release/grafana-7.5.3-1.x86_64.rpm

Sudo RPM -i --nodeps grafana-7.5.3-1.x86_64.rpm

Grafana-server -v Displays the version

Step2: Start Grafana

sudo service grafana-server start

Step3: Browser access

http://host:3000

Default password: admin/admin

Anonymous login reference can be set

Step4: set the data source

Step5: Set up the JMeter report template

Jmeter set

Step1: create a back-end listener

For backend listener implementation, select influxDB

After JMeter simulates sending the request, you can see the corresponding data report displayed in the Grafana background

How can I perform pressure tests for different projects without overwriting the listener of the original project and display the corresponding report on the Grafana platform

When creating the back-end listener in JMeter, set application. Different projects have different application names. Select the corresponding Application from the Data display panel of the Grafana platform