性能测试之JVM的监控Grafana
2024-09-04 00:35:24
安装配置Grafana参考
https://testerhome.com/articles/23629
使用配置
- 下载jmx_exporter
https://github.com/prometheus/jmx_exporter
- 创建jmx_exporter配置文件
vim simple-config.yml
lowercaseOutputLabelNames: true
lowercaseOutputName: true
whitelistObjectNames: ["java.lang:type=OperatingSystem"]
blacklistObjectNames: []
rules:
- pattern: 'java.lang<type=OperatingSystem><>(committed_virtual_memory|free_physical_memory|free_swap_space|total_physical_memory|total_swap_space)_size:'
name: os_$1_bytes
type: GAUGE
attrNameSnakeCase: true
- pattern: 'java.lang<type=OperatingSystem><>((?!process_cpu_time)\w+):'
name: os_$1
type: GAUGE
attrNameSnakeCase: true
javaagent启动应用
java -javaagent:./jmx_prometheus_javaagent-0.14.0.jar=8080:simple-config.yaml -jar yourJar.jar
- 在prometheus配置文件中添加配置
scrape_configs:
- job_name: 'java'
static_configs:
- targets: ['<host>:<port>']
- 重启prometheus
nohup ./prometheus > prometheus.log 2>&1 &
- 下载并导入dashboards
https://grafana.com/grafana/dashboards/7727
https://grafana.com/grafana/dashboards/8563
注:8563模板对7727有依赖,所以需全部安装,否则不能正常使用
效果图
扫一扫,关注我
最新文章
- opengl 笔记(1)
- oracle修改表字段
- SQL查询表中的有那些索引
- 在Ubuntu上安装JDK、Ant、Jmeter和Jenkins
- PHP将在对象被销毁前调用这个函数.它称为析构函数
- docker kubernetes--
- Context上下文对象(抄书的)
- String Subtraction
- IE下判断IE版本的语句
- 【转】Linux中history历史命令使用方法详解
- Java的基本语法
- Redis总结(六)Redis配置文件全解
- PHP 环境搭建篇
- Windows10下的docker安装与入门 (二)使用docker引擎在容器中运行镜像
- maven创建一个简单的web项目
- Packet for query is too large (1660 >; 1024). You can change this value on the server by setting the max_allowed_packet&#39; variable.
- spring注解开发
- bash 定时任务
- Educational Codeforces Round 21 Problem A - C
- blast 数据库说明
热门文章
- AMD Ryzen 5000系列桌面处理器 2020年10月8日发布
- Elasticsearch(3):别名
- 高性能HTTP加速器Varnish--基础知识
- 我要告诉你:java接口中可以定义private私有方法
- 炉石传说酒馆战棋一键拔线(windows)
- ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)解决方案
- 多测师讲解自动化--rf断言(下)--_高级讲师肖sir
- IDEA项目区模块文件变为红色解决办法
- swoft生成控制器
- ASP.NET 获取客户端IP地址