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. You can configure targets either by annotating pods in your Kubernetes cluster or by listing static endpoints in your Helm values. To configure the ZooKeeper integration, follow these steps:-
To collect from ZooKeeper pods in Kubernetes, add a CXDOT integration annotation to
the pod template. The annotation key must end with the container name. For example,
add the following annotation to your ZooKeeper workload:
The Collector replaces
${target.host}with the pod IP address and${target.port.client}with the container port namedclient. The Collector also discovers ZooKeeper pods that carry theapp.kubernetes.io/name: zookeeperlabel and listen on port2181. A CXDOT integration annotation takes precedence over the label for its container. To stop collecting from a container, setzookeeper: {enabled: false}in the annotation. Metrics from each discovered pod include that pod’s Kubernetes metadata. For more information, see autodiscovery. -
Optional: To collect from ZooKeeper servers outside your Kubernetes cluster,
configure static targets. 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 discovery. 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 annotated
pods 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 discovering pods. -
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 undercollection.cxdot.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:[]. 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.