热门标签 | HotTags
当前位置:  开发笔记 > 编程语言 > 正文

Grafana监控JVM

安装配置Grafana参考https:testerhome.comarticles23629使用配置下载jmx_exporterhttps:github.comprometheus

安装配置Grafana参考
https://testerhome.com/articles/23629


使用配置



  1. 下载jmx_exporter

https://github.com/prometheus/jmx_exporter


  1. 创建jmx_exporter配置文件

vim simple-config.yml
lowercaseOutputLabelNames: true
lowercaseOutputName: true
whitelistObjectNames: ["java.lang:type=OperatingSystem"]
blacklistObjectNames: []
rules:
- pattern: ‘java.lang<>(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<>((?!process_cpu_time)\w+):‘
name: os_$1
type: GAUGE
attrNameSnakeCase: true


  1. 在prometheus配置文件中添加配置

scrape_configs:
- job_name: ‘java‘
static_configs:
- targets: [‘:

‘]


  1. 重启prometheus

nohup ./prometheus > prometheus.log 2>&1 &


  1. 下载并导入dashboards

https://grafana.com/grafana/dashboards/7727
https://grafana.com/grafana/dashboards/8563
注:8563模板对7727有依赖,所以需全部安装,否则不能正常使用

效果图

技术图片
技术图片
技术图片


扫一扫,关注我


技术图片

Grafana监控JVM



推荐阅读
author-avatar
慕容盼烟迎曼
这个家伙很懒,什么也没留下!
PHP1.CN | 中国最专业的PHP中文社区 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved | 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有