当前位置:网站首页>(2) Construction of a real-time performance monitoring platform (Grafana+Prometheus+Jmeter)
(2) Construction of a real-time performance monitoring platform (Grafana+Prometheus+Jmeter)
2022-08-11 05:36:00 【Xiao Tan floats in Shanghai】
前言
在前面的小节中,We explain in detail how to build oneHTTPInterface performance real-time monitoring test platform,使用Grafana+Influxdb+Jmeter的组合实现,In this section we continue the content of the previous section,Use another set of combinations,Grafana+Prometheus+Jmeter的方式实现,原理基本是一致的,只是配置稍有不同.好了,话不多说,我们开始.
正文
- 创建Prometheus容器
命令:docker run -d --name prometheus-dsp --restart=always -p 9091:9090 -e "TZ=Asia/Shanghai" prom/prometheus
访问 Prometheus
使用http://ip+port
注意:If the following error occurs when creating a container,The external access port needs to be replaced,The premise is that the container that fails to be created needs to be deleted.
prometheus.yml配置文件中添加jmeter监控地址
命令:docker exec -it prometheus-dsp sh使用vi编辑器修改prometheus.yml的配置文件,添加jmeter的配置监控,此处使用的ipThe address is usjmeter所在服务器的IP地址,端口为固定的9270端口,然后重启容器,我们的prometheusThe database server is set up,The configured monitoring address can be used subsequently,通过jmeter写入测试数据.
Grafana配置
How to create it was described in the previous chapterGrafana容器,This chapter will not introduce it!请参考(一)Build a real-time performance monitoring test platform(Grafana+Influxdb+Jmeter)本节中grafana的相关部分.
- 配置Prometheus数据源
![]()
![]()
![]()
![]()
- 配置PrometheusMonitor monitoring templates
- 访问:Dashboards | Grafana Labs,Get monitoring templates
下载Json文件和CopyID都行,这次就CopyID
![]()
![]()
![]()
deploy here,整个Grafana+Prometheus+JmeterThe configuration of the monitoring platform is complete
配置Jmeter插件
下载Prometheus的Jmeter插件
下载地址:https://github.com/johrstrom/jmeter-prometheus-plugin/releases,这里我们下载0.5.2版本的.
- 将下载的jar包jmeter-prometheus-plugin-0.5.2.jar放置在Jmeter目录的\apache-jmeter-5.0\lib\ext目录下
启动Jmeter
The previous chapter introduced how to configure pressure measurementJmeter
请参考:(一)Build a real-time performance monitoring test platform(Grafana+Influxdb+Jmeter)
注意:appears in the listenerPrometheus Listener说明插件安装成功,Reboot if not neededJmeter
添加一个Prometheus监听器
点击jmeter开始测试按钮,访问http://localhost:9270/metrics地址
如果出现如下内容,说明我们的jmeterData is ready to be collected,PrometheusIt is through this interface that our test data is collected,我们PrometheusThe configured monitoring address is here,It is used in the previous configurationIP地址,因为localhost只能本地访问.
- 查看Prometheus,See if there is data written
- 进入Prometheus查看Status内TargetsMonitor whether the operation is successful,If there is a failure, it is very likelyprometheus.ymlThe internal address is not configured correctly
![]()
- 查看Grafana监控面板
结语
ok,到这里,性能实时监控平台搭建(Grafana+Prometheus+Jmeter)及演示就完成了,我们下期见...
边栏推荐
- Redis-使用jedis连接linux中redis服务器失败的解决方案
- (二)性能实时监控平台搭建(Grafana+Prometheus+Jmeter)
- 第二篇 DS5 Armv8 样例工程报错之GCC编译
- (2) Docker installs Redis in practice (persistent AOF and RDB snapshots)
- [Verilog] I2S Master Test Bench
- 【嵌入式开源库】cJSON的使用,高效精简的json解析库
- The most complete installation tutorial of Pytorch (one step)
- 【嵌入式开源库】使用J-Link打印日志,让你节省一个打印串口
- (二)Docker安装Redis实战(持久化AOF和RDB快照)
- tensorflow代码翻译成pytorch代码 -详细教程+案例
猜你喜欢
Idea essential skills to improve work efficiency
Redis-数据类型(基本指令、String、List、Set、Hash、ZSet、BitMaps、HyperLogLog、GeoSpatial)/发布和订阅
玩转mysql之查看mysql版本号
ARM结构体系4:嵌入式硬件平台接口开发
关于ie下href有中文出现RFC 7230 and RFC 3986问题的研究
tensorflow代码翻译成pytorch代码 -详细教程+案例
【转载】如何理解数据集中【训练集】、【验证集】和【测试集】
(一)Docker安装Redis实战(一主二从三哨兵)
Weekly recommended short video: your commonly used Polaroid, its predecessor turned out to be like this!
Unity WebGL RuntimeError: integer overflow
随机推荐
[Embedded open source library] The use of MultiButton, an easy-to-use event-driven button driver module
并发编程之线程基础
【嵌入式开源库】MultiTimer 的使用,一款可无限扩展的软件定时器
什么是三次握手和四次挥手(清晰易懂)
Flask framework learning: template rendering and Get, Post requests
【动态代理】CGLIB 动态代理的使用及原理
curl 命令调用接口demo
Redis详解
课堂练习--0708
2022 Quality Officer-Civil Construction Direction-General Basic (Quality Officer) Exam Mock 100 Questions and Online Mock Exam
flask框架学习:debug与配置项
Four functional interfaces
关于ie下href有中文出现RFC 7230 and RFC 3986问题的研究
arraylist之与linkedlist
[Verilog] I2S Master Test Bench
BGP Comprehensive Experiment
性能效率测试
Delphi7学习记录-demo实例
vftpd本地可以连接,远程连接超时的解决
(三)Redis 如何进行压测