自学内容网 自学内容网

prometheus监控zookeeper方案

这里要求zookeeper版本必须达到3.6或以上,用的是官方自带的监控信息。

官方下载地址 https://zookeeper.apache.org/releases.html#download

然后在zookeeper的配置文件,比如zoo.cfg最后面加上这一段

metricsProvider.className=org.apache.zookeeper.metrics.prometheus.PrometheusMetricsProvider
metricsProvider.httpPort=7000
metricsProvider.exportJvmInfo=true

比如就把7000端口暴露出来为监控用

然后在普米配置文件配置即可

- job_name: 'zookeeper-monitor'
  static_configs:
  - targets: ['x.x.x.x:7000']
     labels: { job: 'zookeeper', region: 'xxx环境'}

原文地址:https://blog.csdn.net/chaodaibing/article/details/136539320

免责声明:本站文章内容转载自网络资源,如本站内容侵犯了原著者的合法权益,可联系本站删除。更多内容请关注自学内容网(zxcms.com)!