当前位置:网站首页>prometheus监控nacos
prometheus监控nacos
2022-07-28 05:27:00 【opreator.ke】
1.nacos
官方文档:https://nacos.io/zh-cn/docs/monitor-guide.html
版本:docker 1.4.1
修改配置文件:/home/nacos/conf/application.properties
增加配置,,暴露metrics数据
management.endpoints.web.exposure.include=*重启nacos
访问{ip}:8848/nacos/actuator/prometheus,看是否能访问到metrics数据
2.prometheus
修改prometheus.yml,增加配置
- job_name: 'nacos'
metrics_path: '/nacos/actuator/prometheus'
static_configs:
- targets: ['192.168.1.1:8848']
labels:
instance: 'nacos'重启prometheus 生效,并进入prometheus,输入nacos_monitor,有数据产生则ok ,如图

3.grafana 引入nacos官方grafana json模板
官方地址:https://github.com/nacos-group/nacos-template/blob/master/nacos-grafana.json
直接导入会导致无数据,需要调整2处地方。
3.1数据源不正确问题
- [nacos 官方给的监控模板](https://github.com/nacos-group/nacos-template)中的数据源名称为 `prometheus` ,而 `Grafana` 默认的 Prometheus 数据源名称为 `Prometheus`(P大写),由于不匹配,导致不会显示任何数据。
直接调整编辑nacos-grafana.json ,替换为Prometheus
3.2 标签没有正确匹配,调衡Variables,
增加Query
label_values(instance)
增加Regex 正则匹配nacos
(nacos-.*)
如图

4 监控实图

边栏推荐
- OJ 1018 counting game
- 江中ACM新生10月26日习题题解
- Mysql-8.0.17-winx64 (additional Navicat) manual configuration version installation
- OJ 1018 报数游戏
- Battle plague Cup -- my account book
- SSAO by computer shader (I)
- 【自我救赎的开始】
- Treasure plan TPC system development DAPP construction
- 二维数组实战:螺旋矩阵
- Leetcode 刷题日记 剑指 Offer II 050. 向下的路径节点之和
猜你喜欢

SSAO by computer shader (III)

从普通查询商品到高并发查询商品的优化思路

水瓶效果制作

Leetcode brush question diary sword finger offer II 048. serialization and deserialization binary tree

【无标题】

Leetcode 刷题日记 剑指 Offer II 050. 向下的路径节点之和

结构体、位段、联合体(共用体)的大小如何计算

【二叉树基础知识】

SSAO By Computer Shader(二)
![[dynamic planning -- the best period for buying and selling stocks series 3]](/img/9f/f6c07264f5ffaa0fdfcc724c713e83.png)
[dynamic planning -- the best period for buying and selling stocks series 3]
随机推荐
[dynamic planning -- the best period for buying and selling stocks series 3]
Current learning progress
[C note] data type and storage
Leetcode brush questions diary sword finger offer II 047. Binary tree pruning
NiO example
Graphic pipeline foundation (I)
【C语言】动态内存管理
OJ 1089 春运
Water bottle effect production
[队列,栈的简单应用----包装机]
Leetcode 刷题日记 剑指 Offer II 048. 序列化与反序列化二叉树
Ready to start blogging
Redis cache design and performance optimization
Development of clip arbitrage / brick carrying arbitrage system
mysql-8.0.17-winx64(附加navicat)手动配置版安装
[PTA----树的遍历]
OJ 1507 deletion problem
What is hash? (development of Quantitative Trading Robot System)
2022-07-17 Damon database installation
C语言的动态内存管理函数