美文网首页
nacos prometheus监控接入

nacos prometheus监控接入

作者: _fishman | 来源:发表于2020-07-06 16:56 被阅读0次

1、nacos配置

nacos默认是没有开启指标
配置application.properties文件,暴露metrics数据

management.endpoints.web.exposure.include=*

可尝试访问,如果返回数据则是正常

curl localhost:8848/nacos/actuator/prometheus

2、prometheus配置

  - job_name: 'nacos-cluster'
    scrape_interval: 60s
    metrics_path: '/nacos/actuator/prometheus'
    static_configs:
      - targets:
         - 10.0.0.100:8848
         - 10.0.0.101:8848
         - 10.0.0.102:8848

检查prometheus配置是否正常

./promtool check config prometheus.yml

3、 告警指标请参考下面官方文档

官方文档

相关文章

网友评论

      本文标题:nacos prometheus监控接入

      本文链接:https://www.haomeiwen.com/subject/qshgqktx.html