Zookeepers


Basic information 

Connectivity to Zookeeper is optional for Lenses. Zookeeper is used by Lenses for such purposes:

  1. To provide quotas management (until quotas can be managed via the Brokers API)
  2. 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.

Adding a connection 

Modifying a connection 

To edit a connection, go to:

Admin / Connections

select the Zookeeper connection and in actions select edit.:

Connection details 

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

Provision yaml 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 Connections via Lenses CLI provisionsub-command
  • Find out more about managing Connections via API

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

--
Last modified: April 17, 2024