
Prometheus + Grafana 监控系统搭建使用指南-Nacos 接入 Prometheus 监控
nacos
Nacos是由阿里巴巴开源的服务治理中间件,集成了动态服务发现、配置管理和服务元数据管理功能,广泛应用于微服务架构中,简化服务治理过程。
项目地址:https://gitcode.com/gh_mirrors/na/nacos

·
Nacos 接入 Prometheus 监控
系列文章目录
- Prometheus 的安装部署
- Grafana的安装部署
- Linux服务器接入Prometheus监控-Node Exporter 安装指南
- Prometheus 接入SpringBoot微服务监控
- Mysql 接入 Prometheus
- RocketMQ 接入Prometheus 监控
- ElasticSearch 接入 Prometheus
- Nacos 接入 Prometheus 监控
- Redis 接入 Prometheus 监控系统
- Prometheus + Grafana 监控系统-告警规则配置
- Prometheus + Grafana 监控系统-PrometheusAlert安装与配置指南
-
官方参考: https://nacos.io/zh-cn/docs/monitor-guide.html
- Nacos 0.8.0版本完善了监控系统,支持通过暴露metrics数据接入第三方监控系统监控Nacos运行状态,目前支持prometheus、elastic search和influxdb,
- 无需额外安装单独的 explorer
-
开启 Nacos 自带的prometheus监控端点(如果是已经存在的集群,那么需要为每个节点都修改此配置,并且重启生效)
-
配置application.properties文件,暴露metrics数据
# 通常建议设置management.endpoints.web.exposure.include=health,info,metrics,prometheus ,不建议直接设置 * ,导致开放全部。 management.endpoints.web.exposure.include=prometheus
-
访问 curl http://{nacos_ip}:{pord}/nacos/actuator/prometheus ,看是否能访问到metrics数据
- Tips: 生产环境中,建议在nacos 集群的 vip 机制中,利用流量摘除方式实现逐个重启。
/home/work/software/nacos/bin/shutdown.sh /home/work/software/nacos/bin/startup.sh
- Tips: 生产环境中,建议在nacos 集群的 vip 机制中,利用流量摘除方式实现逐个重启。
-
-
集成到 Prometheus
scrape_configs: - job_name: 'nacos' metrics_path: /nacos/actuator/prometheus static_configs: - targets: - ip1:8848 labels: instance: Nacos_node1 - targets: - ip2:8848 labels: instance: Nacos_node2 - targets: - ip:8848 labels: instance: Nacos_node3
- 或者简单配置
scrape_configs: - job_name: 'Nacos' metrics_path: '/nacos/actuator/prometheus' static_configs: - targets: ['{ip1}:8848','{ip2}:8848','{ip3}:8848']
-
Grafana 中添加仪表盘
- https://grafana.com/grafana/dashboards/13221-nacos/




Nacos是由阿里巴巴开源的服务治理中间件,集成了动态服务发现、配置管理和服务元数据管理功能,广泛应用于微服务架构中,简化服务治理过程。
最近提交(Master分支:6 个月前 )
502b08bd
14 天前
12c455b8
* fix:change upload-artifact version to v4
* fix:change github-script version to v7
* fix:change github-script version to v6
* fix:change github-script version to v6
* fix:change github-script version to v6
* fix:delete proxy 16 天前
更多推荐
所有评论(0)