Connectivity to Zookeeper is optional for Lenses. Zookeeper is used by Lenses for such purposes:
Once a Zookeeper connection is defined, Lenses displays all Zookeeper nodes and their statuses (with metrics, if configured so) in Workspace -> Services screen.
Workspace -> Services
To edit a connection, go to:
Admin / Connections
select the Zookeeper connection and in actions select edit.:
Like other core services, Zookeeper is managed via Connections. See more about managing connections.
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
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.
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 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):
metricsPort
my-zookeeper-host-0:9581
my-zookeeper-host-1:9581
my-zookeeper-host-2:9581
Find more about multiple options of configuring services’ metrics (like secured JMX, Jolokia, etc) under Services Metrics
On this page