Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Jmeter + Grafana to build Real-time Monitoring Visualization

2025-04-01 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)06/02 Report--

Csdn article synchronization: https://blog.csdn.net/weixin_40881502/article/details/85345994

Tip: it is recommended to use the jmeter3.3+ version, after which there will be backend listenter docking influxDB.

The backend listenter in Jmeter is shown in the figure

InfluxdbUrl: http://localhost:8086/write?db=jmeter

# host write and install the ip address + port of influxdb service, for example, enter the modified port

Db create database: jmeter

Application: just pick a name and grafana will use it later.

Add a request to jmeter to run, and the executed data will be recorded to influxDB

Install influxDB

OS X (via Homebrew)

Brew update

Brew install influxdb

MD5: 4f0aa76fee22cf4c18e2a0779ba4f462

Ubuntu & Debian (64-bit)

Wget https://dl.influxdata.com/influxdb/releases/influxdb_0.13.0_amd64.deb

Sudo dpkg-I influxdb_0.13.0_amd64.deb

MD5: bcca4c91bbd8e7f60e4a8325be67a08a

Ubuntu & Debian (ARM)

Wget https://dl.influxdata.com/influxdb/releases/influxdb_0.13.0_armhf.deb

Sudo dpkg-I influxdb_0.13.0_armhf.deb

MD5: b64ada82b6abf5d6382ed08dde1e8579

RedHat & CentOS (64-bit)

Wget https://dl.influxdata.com/influxdb/releases/influxdb-0.13.0.x86_64.rpm

Sudo yum localinstall influxdb-0.13.0.x86_64.rpm

MD5: 286b6c18aa4ef37225ea6605a729b61d

RedHat & CentOS (ARM)

Wget https://dl.influxdata.com/influxdb/releases/influxdb-0.13.0.armhf.rpm

Sudo yum localinstall influxdb-0.13.0.armhf.rpm

MD5: 4cf99debb5315fbbb26166506807d965

Standalone Binaries (64-bit)

Wget https://dl.influxdata.com/influxdb/releases/influxdb-0.13.0_linux_amd64.tar.gz

Tar xvfz influxdb-0.13.0_linux_amd64.tar.gz

MD5: 187854536393c67f7793ada1c096da8e

Standalone Binaries (ARM)

Wget https://dl.influxdata.com/influxdb/releases/influxdb-0.13.0_linux_armhf.tar.gz

Tar xvfz influxdb-0.13.0_linux_armhf.tar.gz

Docker Image

Docker pull influxdb

In the actual installation process, you just need to select the corresponding version and follow the command.

If you are using an x86 machine, it is recommended to use a compiled binary version, which is very convenient when you do not have root permissions.

InfluxDB start

1) start on the server

If you installed it through a package, you can start it with the following statement:

Sudo service influxdb start

If the binary package is downloaded directly, start it as follows

Enter usr/bin under the InfluxDB directory and execute:

Influx / / this starts the server.

InfluxDB is an open source distributed database of timing, events and metrics written in the Goto language without external dependency.

Its main features and functions

1) based on time series, support time-related functions (such as maximum, minimum, summation, etc.)

2) measurability: you can calculate a large amount of data in real time

3) event-based: it supports arbitrary event data

# start the service

Launchctl load ~ / Library/LaunchAgents/homebrew.mxcl.influxdb.plist

# stop the service

Launchctl unload ~ / Library/LaunchAgents/homebrew.mxcl.influxdb.plist

# the front desk starts

Influxd-config / usr/local/etc/influxdb.conf

View influxdb running configuration

Influxd config

Influxdb needs to modify the configuration file / etc/influxdb/influxdb.conf

Vim/etc/influxdb/influxdb.conf

[http]

# Determines whether HTTP endpoint is enabled.

# enabled = true

# The bind address used by the HTTP service.

Bind-address = ": 8086"

Start influxDB

Create DB

Influx-port xxxx. I use 8086.

# create database > enter the command create database xxx after

> create database jmeter

# View the database

InfluxDB shell version: v1.7.2

Enter an InfluxQL query

> show databases

Name: databases

Name

-

_ internal

Jmeter

Run the HTTP request in jmeter several times, and then check the result in influxDB

If there is data, it means that jmeter has been successfully stored in the database.

Select a database

> use jmeter

Execute the sql statement to see if the request data has been inserted

> select * from jmeter

Install grafana

Official installation documentation: http://docs.grafana.org/installation/

Install brew as a package management tool under Mac, and then install grafana.

Brew update brew install grafana

The following prompt indicates that the installation is complete

To have launchd start grafana now and restart at login:

Brew services start grafana

Or, if you don't want/need a background service you can just run:

Grafana-server-config=/usr/local/etc/grafana/grafana.ini-homepath / usr/local/share/grafana cfg:default.paths.logs=/usr/local/var/log/grafana cfg:default.paths.data=/usr/local/var/lib/grafana cfg:default.paths.plugins=/usr/local/var/lib/grafana/plugins

Start and stop command

Grafana can be started / stopped in the background with the following command, default port 3000

Start brew services

Start grafana / / start stop brew services

Stop grafana / / stop

Browser login: http://localhost:3000/

Official website template library address: https://grafana.com/dashboards?dataSource=influxdb such as jmeter official template: copy id

After the addition is completed, the following interface appears

Perfect!

Isn't it cool? hurry up and put it into practice.

Today's featured recommendation

JMeter Interface Test-if Controller

JMeter database operation

Jmeter Interface Test-regular expression

JMeter returns garbled code in Chinese

Jmeter interface testing-parameterization

JMeter Interface testing-Basics

Test-impression

Add Wechat to the consulting work

scan a QR code

Welcome self-recommendation and recommendation, need Wechat to push resume!

Please poke the QR code below to learn more.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report