Setup Requirements

Data Collection Setup

Metrics are collected from the JMX interface from the ZooKeeper server(s).

Network Requirements

JMX Port (TCP):

By default, ZooKeeper does NOT enable remote JMX monitoring, only local JMX monitoring. Enabling remote JMX requires specifying a port for remote connections and there is NO default value for this. For more information, see Enabling Remote JMX

Enabling Remote JMX

To enable remote JMX for each ZooKeeper server, go through the following steps for each server.

  1. Navigate to the directory where ZooKeeper is installed
    {PATH TO ZK INSTALL}/apache-zookeeper-{VERSION NUMBER}-bin/
  2. Navigate to the conf directory
  3. In this directory, create a file called zookeeper-env.sh
  4. Paste the following contents into zookeeper-env.sh
JMXLOCALONLY=false
JMXDISABLE=false
JMXPORT={DESIRED PORT NUMBER excluding the braces}
JMXAUTH=false
JMXSSL=false
  1. Restart each ZooKeeper server and, to test if remote JMX is enabled (Without Authentication), try remotely monitoring the ZooKeeper servers with JConsole

Least Privileged User

By default, JMX doesn't use authentication. If authentication is enabled, a JMX user and password is required.

Refer to Enabling remote JMX with password authentication and SSL to learn more about setting up authentication.

Supported Versions

ZooKeeper: 3.4.0 - 3.5.5

Connection Parameters

NameRequired?Description
HostRequiredThe Host of Apache ZooKeeper.
PortThe port for communication to the JMX agent on the Apache ZooKeeper host.
UsernameRequired only if monitoring ZooKeeper through a JMX agent that requires password authentication.
PasswordRequired only if monitoring ZooKeeper through a JMX agent that requires password authentication.
Connection TimeoutThe timeout in seconds for the JMX agent connection.