Supported telemetry types
The ZooKeeper integration supports these telemetry types:Prerequisites
The ZooKeeper integration has the following prerequisites:-
Enable the
mntr,stat, andruokfour-letter commands. For more information, see ZooKeeper four-letter commands. For example, add the following setting tozoo.cfg:To confirm that ZooKeeper accepts the commands, run the following commands from a host that can reach the server:Confirm that themntrresponse includeszk_versionandzk_server_state, thestatresponse includes the server mode, and theruokresponse isimok. -
Make the ZooKeeper client port, typically
2181, reachable from the CXDOT Collector.
Configure
The ZooKeeper integration is enabled by default. To configure the ZooKeeper integration, follow these steps:-
For ZooKeeper pods that listen on port
2181, add theapp.kubernetes.io/name: zookeeperlabel to the pod template. The CXDOT Collector also discovers pods and Services that carry autodiscovery annotations for ZooKeeper. For more information, see autodiscovery. Metrics from discovered pods arrive with that pod’s Kubernetes metadata attached. -
Optional: Configure static targets to collect metrics from ZooKeeper servers that
autodiscovery doesn’t cover, such as servers outside your Kubernetes cluster. For
example, add the following to the
values.yamlfile for the CXDOT Collector Helm chart:This integration instance collects from exactly the listed targets and disables autodiscovery. In a Kubernetes deployment, the cluster-tier CXDOT Collector collects static targets through one elected replica. For more information, see architecture. -
Optional: Configure separate integration instances to collect from both discovered
and static targets. For example, add the following to the
values.yamlfile for the CXDOT Collector Helm chart:Thezookeeper/externalkey defines a named instance for the static targets. Configuring a named instance suppresses the implicit default instance, so the emptyzookeeper: {}entry is required to keep autodiscovery running. -
Optional: Disable the integration to stop collecting from discovered targets. For
example, add the following to the
values.yamlfile for the CXDOT Collector Helm chart:
Validate
To validate the ZooKeeper integration, follow these steps:-
In the
Live Telemetry Analyzer,
add the following filters:
__name__=cxdot.integration.target.healthcxdot.integration.name=zookeeper
1, identified by itsserver.addressandserver.portattributes. -
In
Metrics Explorer,
run the following query while ZooKeeper clients create or delete data tree nodes:
Confirm that the query returns the expected data tree node count for each target.
Configuration reference
Configure one ZooKeeper integration instance with the following settings. In Helm values, place these settings underconfig.integrations.zookeeper. In a Collector configuration file, place
them under cxdot.integrations.zookeeper.
Optional settings
-
enabledType:boolean. Optional. Default:true. Whether to run the ZooKeeper integration. If true, the Collector collects ZooKeeper metrics. If false, the Collector doesn’t run this integration. -
endpointsType:array of object. Optional. Default:[]. Static ZooKeeper targets, specified ashost:port. When this list is empty or omitted, the integration uses automatic target discovery. When the list contains targets, this integration instance collects from exactly those targets and doesn’t use automatic target discovery. Configure a second named instance to use both methods. -
endpoints[].endpointType:string. Required.host:portof the target. -
collection_intervalType:duration. Optional. Default:15s. How often the Collector requests metrics from each ZooKeeper target. -
timeoutType:duration. Optional. Default:15s. Maximum time the Collector waits for a ZooKeeper target to complete one collection, including the connection attempt. This value must be greater than0sand must not exceedcollection_interval. If the deadline expires, that collection fails.