# Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "License"); you may not use this file except in compliance with # the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. category: mid app: zookeeper name: zh-CN: Zookeeper注册配置中心 en-US: Zookeeper Server params: - field: host name: zh-CN: 主机Host en-US: Host type: host required: true - field: port name: zh-CN: 端口 en-US: Port type: number range: '[0,65535]' required: true defaultValue: 2181 - field: timeout name: zh-CN: 查询超时时间(ms) en-US: Query Timeout(ms) type: number required: false hide: true defaultValue: 6000 - field: username name: zh-CN: 用户名 en-US: Username type: text limit: 20 required: true - field: password name: zh-CN: 密码 en-US: Password type: password required: false metrics: #集群状态 - name: conf priority: 0 # 指标组中的具体监控指标 fields: # 指标信息 包括 field名称 type字段类型:0-number数字,1-string字符串 instance是否为实例主键 unit:指标单位 - field: clientPort type: 0 # 数据快照文件目录 默认10万次操作生成一次快照 - field: dataDir type: 1 - field: dataDirSize type: 0 unit: kb # 事务日志文件目录,生产环境放在独立磁盘上 - field: dataLogDir type: 1 # 事务日志文件大小 - field: dataLogSize type: 0 unit: kb # 服务器之间或客户端与服务器之间维持心跳的时间间隔 - field: tickTime type: 0 unit: ms # 最大连接数 - field: maxClientCnxns type: 1 # 最小session超时时间 心跳时间x2 指定时间小于该时间默认使用此时间 - field: minSessionTimeout type: 0 unit: ms # 最大session超时时间 心跳时间x20 指定时间大于该时间默认使用此时间 - field: maxSessionTimeout type: 0 unit: ms # 服务器编号 - field: serverId type: 0 # # 集群中follow与leader之间初始连接能容忍的最大心跳数 # - field: initLimit # type: 0 # # 集群中follow与leader之间请求和应答能容忍的最大心跳数 # - field: syncLimit # type: 0 # # 选举算法 3 基于TCP # - field: electionAlg # type: 1 # # 选举端口 # - field: electionPort # type: 0 # # 集群之间的通信端口 # - field: quorumPort # type: 0 # # 是否观察者 1表示是 # - field: peerType # type: 0 # 协议 protocol: ssh ssh: # 主机host: ipv4 ipv6 域名 host: ^_^host^_^ # 端口 port: ^_^port^_^ username: ^_^username^_^ password: ^_^password^_^ timeout: ^_^timeout^_^ script: echo conf | nc 121.40.113.44 2181 parseType: netcat - name: stats priority: 1 # 指标组中的具体监控指标 fields: # 指标信息 包括 field名称 type字段类型:0-number数字,1-string字符串 instance是否为实例主键 unit:指标单位 - field: zk_version type: 1 # 服务器角色 - field: zk_server_state type: 1 # 连接数 - field: zk_num_alive_connections type: 0 unit: 个 # 平均延时 - field: zk_avg_latency type: 0 unit: ms # 堆积请求数 - field: zk_outstanding_requests type: 0 unit: 个 # znode结点数量 - field: zk_znode_count type: 0 unit: 个 # 发包数 - field: zk_packets_sent type: 0 unit: 个 # 收包数 - field: zk_packets_received type: 0 unit: 个 # watch数量 - field: zk_watch_count type: 0 unit: 个 # 最大文件描述符数量 - field: zk_max_file_descriptor_count type: 0 unit: 个 # 数据大小 - field: zk_approximate_data_size type: 0 unit: kb # 打开的文件描述符数量 - field: zk_open_file_descriptor_count type: 0 unit: 个 # 最大延时 - field: zk_max_latency type: 0 unit: ms # 临时节点数 - field: zk_ephemerals_count type: 0 unit: 个 # 最小延时 - field: zk_min_latency type: 0 unit: ms # 协议 protocol: ssh ssh: # 主机host: ipv4 ipv6 域名 host: ^_^host^_^ # 端口 port: ^_^port^_^ username: ^_^username^_^ password: ^_^password^_^ timeout: ^_^timeout^_^ script: echo mntr | nc 121.40.113.44 2181 parseType: netcat