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.
- Navigate to the directory where ZooKeeper is installed
{PATH TO ZK INSTALL}/apache-zookeeper-{VERSION NUMBER}-bin/
- Navigate to the
conf
directory - In this directory, create a file called
zookeeper-env.sh
- Paste the following contents into
zookeeper-env.sh
JMXLOCALONLY=false
JMXDISABLE=false
JMXPORT={DESIRED PORT NUMBER excluding the braces}
JMXAUTH=false
JMXSSL=false
- 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
Name | Required? | Description |
---|---|---|
Host | Required | The Host of Apache ZooKeeper. |
Port | The port for communication to the JMX agent on the Apache ZooKeeper host. | |
Username | Required only if monitoring ZooKeeper through a JMX agent that requires password authentication. | |
Password | Required only if monitoring ZooKeeper through a JMX agent that requires password authentication. | |
Connection Timeout | The timeout in seconds for the JMX agent connection. |
Updated over 4 years ago