5.0
Zookeeper
Basic information
Connectivity to Zookeeper is optional for Lenses. Zookeeper is used by Lenses for such purposes:
- To provide quotas management (until quotas can be managed via the Brokers API)
- To autodetect the JMX connectivity settings to Kafka brokers (if metrics are not defined directly for Kafka connection ).
Once a Zookeeper connection is defined, Lenses displays all Zookeeper nodes and
their statuses (with metrics, if configured so) in Workspace -> Services
screen.
Some managed Kafka services, such as these provided by Aiven, Confluent, and IBM Event Streams do not provide access to Zookeeper.
Connection details
Like other core services, Zookeeper is managed via Connections. See more about managing connections here .
Multiple connections allowed: NO
Deletion allowed: YES
When managing connections other than with GUI, such information are relevant for Zookeeper connection:
Template name: Zookeeper
Constant connection name: zookeeper
Examples
The easiest way to manage Connections is via Lenses GUI under their respective pages, however it is also possible to do it directly via API, Helm or Lenses CLI. In such case, some connection type-specific values have to be used. Here are few examples of such configuration in YAML format.
- Find out more about managing Zookeeper Connection via API
- Find out more about managing Connections via Lenses CLI provision
- Find out more about installing Lenses via Helm
Simple configuration, without metrics
zookeeper:
tags: [ "tag1" ]
templateName: Zookeeper
configurationObject:
zookeeperUrls:
- my-zookeeper-host-0:2181
- my-zookeeper-host-1:3181
- my-zookeeper-host-2:4181
zookeeperChrootPath: "/mypath" # optional, to add a suffix to Zookeeper's connection string
zookeeperSessionTimeout: 10000 # in milliseconds
zookeeperConnectionTimeout: 10000 # in milliseconds
Simple configuration, with JMX metrics
Simple configuration with Zookeeper metrics read via JMX.
zookeeper:
tags: [ "tag1" ]
templateName: Zookeeper
configurationObject:
zookeeperUrls:
- my-zookeeper-host-0:2181
- my-zookeeper-host-1:3181
- my-zookeeper-host-2:4181
zookeeperSessionTimeout: 10000 # in milliseconds
zookeeperConnectionTimeout: 10000 # in milliseconds
# all metrics properties are optional
metricsPort: 9581
metricsType: JMX
metricsSsl: false
With such a configuration, Lenses will use 3 Zookeeper nodes and will try to read their metrics from
following urls (notice the same port - 9581 - used for all of them, as defined by metricsPort
property):
my-zookeeper-host-0:9581
my-zookeeper-host-1:9581
my-zookeeper-host-2:9581
Misc metrics configurations
Find more about multiple options of configuring services’ metrics (like secured JMX, Jolokia, etc) under Services Metrics