Zookeeper服务配置

服务参数

参数名 参数描述
root_logger zookeeper的日志归档
JAVA_OPTS JVM相关的参数

高级参数配置

Zookeeper服务支持 zoo.cfg 配置文件的配置增加服务(若版本低于1.7.3,则需要手动添加该配置组),请按照以下步骤执行:

明确需要添加的参数名称,以 zoo.cfg 的 maxClientCnxns 配置项为例,在 zoo.cfg 分组下新增对应的字段名,类型为string

增加新配置项后即可设置该新配置项的值

应用当前新配置后,重启服务,勾选同步配置让配置生效

服务指标

JVM指标

度量名 说明
jvm_buffer_pool_used_bytes Used bytes of a given JVM buffer pool.
jvm_buffer_pool_capacity_bytes Bytes capacity of a given JVM buffer pool.
jvm_buffer_pool_used_buffers Used buffers of a given JVM buffer pool.
jvm_gc_collection_seconds Time spent in a given JVM garbage collector in seconds.
jvm_classes_loaded The number of classes that are currently loaded in the JVM
jvm_classes_loaded_total The total number of classes that have been loaded since the JVM has started execution
jvm_classes_unloaded_total The total number of classes that have been unloaded since the JVM has started execution
jmx_config_reload_failure_total Number of times configuration have failed to be reloaded.
jvm_memory_bytes_used Used bytes of a given JVM memory area.
jvm_memory_bytes_committed Committed (bytes) of a given JVM memory area.
jvm_memory_bytes_max Max (bytes) of a given JVM memory area.
jvm_memory_bytes_init Initial bytes of a given JVM memory area.
jvm_memory_pool_bytes_used Used bytes of a given JVM memory pool.
jvm_memory_pool_bytes_committed Committed bytes of a given JVM memory pool.
jvm_memory_pool_bytes_max Max bytes of a given JVM memory pool.
jvm_memory_pool_bytes_init Initial bytes of a given JVM memory pool.
jvm_threads_current Current thread count of a JVM
jvm_threads_daemon Daemon thread count of a JVM
jvm_threads_peak Peak thread count of a JVM
jvm_threads_started_total Started thread count of a JVM
jvm_threads_deadlocked Cycles of JVM-threads that are in deadlock waiting to acquire object monitors or ownable synchronizers
jvm_threads_deadlocked_monitor Cycles of JVM-threads that are in deadlock waiting to acquire object monitors
jvm_info JVM version info
jmx_config_reload_success_total Number of times configuration have successfully been reloaded.
jmx_scrape_duration_seconds Time this JMX scrape took, in seconds.
jmx_scrape_error Non-zero if this scrape failed.
jmx_exporter_build_info A metric with a constant ‘1’ value labeled with the version of the JMX exporter.

进程指标

度量名 说明
process_cpu_seconds_total Total user and system CPU time spent in seconds.
process_start_time_seconds Start time of the process since unix epoch in seconds.
process_open_fds Number of open file descriptors.
process_max_fds Maximum number of open file descriptors.
process_virtual_memory_bytes Virtual memory size in bytes.
process_resident_memory_bytes Resident memory size in bytes.

系统指标

度量名称 度量说明
os_free_physical_memory_bytes FreePhysicalMemorySize (java.lang<>FreePhysicalMemorySize)
os_committed_virtual_memory_bytes CommittedVirtualMemorySize (java.lang<>CommittedVirtualMemorySize)
os_total_swap_space_bytes TotalSwapSpaceSize (java.lang<>TotalSwapSpaceSize)
os_max_file_descriptor_count MaxFileDescriptorCount (java.lang<>MaxFileDescriptorCount)
os_system_load_average SystemLoadAverage (java.lang<>SystemLoadAverage)
os_total_physical_memory_bytes TotalPhysicalMemorySize (java.lang<>TotalPhysicalMemorySize)
os_system_cpu_load SystemCpuLoad (java.lang<>SystemCpuLoad)
os_free_swap_space_bytes FreeSwapSpaceSize (java.lang<>FreeSwapSpaceSize)
os_available_processors AvailableProcessors (java.lang<>AvailableProcessors)
os_process_cpu_load ProcessCpuLoad (java.lang<>ProcessCpuLoad)
os_open_file_descriptor_count OpenFileDescriptorCount (java.lang<>OpenFileDescriptorCount)

业务指标

度量名称 度量说明
zookeeper_MaxClientCnxnsPerHost MaxClientCnxnsPerHost (org.apache.ZooKeeperService<>MaxClientCnxnsPerHost)
zookeeper_MaxSessionTimeout MaxSessionTimeout (org.apache.ZooKeeperService<>MaxSessionTimeout)
zookeeper_MaxRequestLatency MaxRequestLatency (org.apache.ZooKeeperService<>MaxRequestLatency)
zookeeper_ElectionType ElectionType (org.apache.ZooKeeperService<>ElectionType)
zookeeper_SyncLimit SyncLimit (org.apache.ZooKeeperService<>SyncLimit)
zookeeper_Tick Tick (org.apache.ZooKeeperService<>Tick)
zookeeper_PendingRevalidationCount PendingRevalidationCount (org.apache.ZooKeeperService<>PendingRevalidationCount)
zookeeper_PacketsReceived PacketsReceived (org.apache.ZooKeeperService<>PacketsReceived)
zookeeper_MinRequestLatency MinRequestLatency (org.apache.ZooKeeperService<>MinRequestLatency)
zookeeper_TickTime TickTime (org.apache.ZooKeeperService<>TickTime)
zookeeper_NumAliveConnections NumAliveConnections (org.apache.ZooKeeperService<>NumAliveConnections)
zookeeper_InitLimit InitLimit (org.apache.ZooKeeperService<>InitLimit)
zookeeper_PacketsSent PacketsSent (org.apache.ZooKeeperService<>PacketsSent)
zookeeper_InMemoryDataTree_NodeCount NodeCount (org.apache.ZooKeeperService<>NodeCount)
zookeeper_MinSessionTimeout MinSessionTimeout (org.apache.ZooKeeperService<>MinSessionTimeout)
zookeeper_OutstandingRequests OutstandingRequests (org.apache.ZooKeeperService<>OutstandingRequests)
zookeeper_AvgRequestLatency AvgRequestLatency (org.apache.ZooKeeperService<>AvgRequestLatency)
zookeeper_InMemoryDataTree_WatchCount WatchCount (org.apache.ZooKeeperService<>WatchCount)
zookeeper_QuorumSize QuorumSize (org.apache.ZooKeeperService<>QuorumSize)