Prometheus + Grafana 监控系统搭建使用指南-Nacos 接入 Prometheus 监控

Nacos 接入 Prometheus 监控

系列文章目录

  1. Prometheus 的安装部署
  2. Grafana的安装部署
  3. Linux服务器接入Prometheus监控-Node Exporter 安装指南
  4. Prometheus 接入SpringBoot微服务监控
  5. Mysql 接入 Prometheus
  6. RocketMQ 接入Prometheus 监控
  7. ElasticSearch 接入 Prometheus
  8. Nacos 接入 Prometheus 监控
  9. Redis 接入 Prometheus 监控系统
  10. Prometheus + Grafana 监控系统-告警规则配置
  11. Prometheus + Grafana 监控系统-PrometheusAlert安装与配置指南

在这里插入图片描述

  • 官方参考: https://nacos.io/zh-cn/docs/monitor-guide.html

    • Nacos 0.8.0版本完善了监控系统,支持通过暴露metrics数据接入第三方监控系统监控Nacos运行状态,目前支持prometheus、elastic search和influxdb,
    • 无需额外安装单独的 explorer
  1. 开启 Nacos 自带的prometheus监控端点(如果是已经存在的集群,那么需要为每个节点都修改此配置,并且重启生效)

    1. 配置application.properties文件,暴露metrics数据

      # 通常建议设置management.endpoints.web.exposure.include=health,info,metrics,prometheus ,不建议直接设置 * ,导致开放全部。
      management.endpoints.web.exposure.include=prometheus
      
    2. 访问 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
        
  2. 集成到 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']
    
  3. Grafana 中添加仪表盘

  • https://grafana.com/grafana/dashboards/13221-nacos/
  • 在这里插入图片描述
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值