当前位置:网站首页>Prometheus+grafana visual real-time JVM monitoring tool
Prometheus+grafana visual real-time JVM monitoring tool
2022-07-19 00:46:00 【Sea of sperm whales】
Install first Grafana:
Docker Deploy visual monitoring tools Grafana
Install again Prometheus And configure to Grafana
download JMX Exporter Of jar Package for monitoring JVM Information
To collect JVM Information , You can start Java Passed at the time of the project JMX Exporter( Download address :https://repo1.maven.org/maven2/io/prometheus/jmx/jmx_prometheus_javaagent/ ) To collect . With jmx_prometheus_javaagent-0.12.0.jar For example .
1. download :
wget https://repo1.maven.org/maven2/io/prometheus/jmx/jmx_prometheus_javaagent/0.12.0/jmx_prometheus_javaagent-0.12.0.jar
You can also download it locally and send it to the server .
New configuration file simple-config.yml
touch simple-config.yml
vim simple-config.yml
wercaseOutputLabelNames: 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
Use JMX Exporter Plugins collect data , start-up jar The package needs to be changed to this :
java -javaagent:/home/jar/demo/jmx_prometheus_javaagent-0.12.0.jar=8037:/home/jar/demo/simple-config.yml -jar swagger-0.0.1-SNAPSHOT.jar
【 Be careful 】 Record here 8037 The port number and IP Address follow up Prometheus Use in profile
The structure here is like this :
modify prometheus.yml
lookup scrape_configs node , Increase monitoring Job Child node , Examples are as follows :
- job_name: 'java'
scrape_interval: 30s
static_configs:
- targets: ['120.48.54.67:8037']

【 Be careful 】 Record here job_name follow-up Grafana Use in
restart Prometheus service
docker restart pensive_williamson
Check it out
1、 visit Prometheus Of IP9090 port , The interface indicates that the startup is successful . Such as :http://127.0.0.1:9090/
2、 Check out the existing JVM Information 
Click for details , You need to configure these information Grafana Convert the template into visual information .
To configure Grafana Templates
Templates ID:8563




边栏推荐
- 有证书有目录!|海泰密码服务平台
- [sort] insert sort, Hill sort and heap sort
- [acwing weekly rematch] game 60 20220716
- 全国职业院校技能大赛网络安全B模块 编码信息获取
- Nodejs does not support the solution of ES6 modular specification
- Stateless design of application
- C language basic drill (5)
- Daily question 1: palindrome linked list (Sword finger off027)
- [dynamic planning]dp24 house raiding (II) - medium
- 【论文阅读】YOLOv7: Trainable bag-of-freebies sets new state-of-the-art for real-time object detectors
猜你喜欢

【无标题】

A case of using promise to read and write files in nodejs

Hcia-r & s self use notes (10) VRP foundation, command, remote management

Cookie和Session、JWT的区别

note

按住 Day 27 :服务

Daily question 1: merge two sorted linked lists (Sword finger offer25)

交换机与路由器技术:热备份路由选择协议HSRP、HSRP和SPVSTP综合实验

Effectively reduce project costs, starting with project procurement management

NXP i.MX8M Plus赋能边缘机器学习,启扬IAC-IMX8MP-Kit开发板
随机推荐
Points needing attention in vertx programming
有效降低项目成本,从项目采购管理抓起
Database collation
例行运维巡检,通过监控视图发现客户
Use protobuf in the program
【无标题】
有关直角坐标系旋转(n*90°)(1 ≤ n ≤ 4)的坐标求解
Some friends asked me if I could learn programming if my English was poor?
笔记
2. Research on stm32f4 USB protocol - SD card analog USB stick
[Vulnhub] Raven-2 (mysql-UDF提权)
[sort] insert sort, Hill sort and heap sort
Hcia-r & s self use notes (8) IP address basis, subnet mask, subnet Division
业务太忙,真的是没时间搞自动化理由吗?
Deep learning paper: lednet: a lightweight encoder decoder network for real-time semantic segmentation and its pytorch implementation
有的小伙伴问我英语不好可以学编程吗?
Coordinate solution of rectangular coordinate system rotation (n*90 °) (1 ≤ n ≤ 4)
CodeTON Round 1 (Div. 1 + Div. 2, Rated, Prizes)(A-C)
vertx编程需注意的点
双指针汇总(未完待续)