ZooKeeper is a distributed, open-source coordination service for distributed applications. It exposes a simple set of primitives that distributed applications can build upon to implement higher level services for synchronization, configuration maintenance, and groups and naming.
This is a fork of the Telegraf ZooKeeper plugin.
zookeeper plugin is included with the AppOptics host agent by default. Please follow the directions below to enable it for a host agent instance.
The host agent provides an example configuration file to help you get started quickly. It defines the plugin and task file to be loaded by the agent, but requires you to provide the correct settings for your ZooKeeper installation. To enable the plugin:
- Make a copy of the ZooKeeper example configuration file
/opt/appoptics/etc/plugins.d/zookeeper.yaml.example, renaming it to
$ sudo cp /opt/appoptics/etc/plugins.d/zookeeper.yaml.example /opt/appoptics/etc/plugins.d/zookeeper.yaml
- Edit the configuration file with settings specific to your ZooKeeper configuration:
$ sudo nano /opt/appoptics/etc/plugins.d/zookeeper.yaml
In this configuration you’ll notice that it is already configured to listen on
collector: # Reads 'mntr' stats from one or many zookeeper servers zookeeper: all: ## An array of address to gather stats about. Specify an ip or hostname ## with port. ie localhost:2181, 10.0.0.1:2181, etc. ## If no servers are specified, then localhost is used as the host. ## If no port is specified, 2181 is used # servers: "10.0.0.1:2181,10.0.0.2:2181,10.0.0.3:2181" # servers: ":2181" load: plugin: snap-plugin-collector-bridge-zookeeper task: task-bridge-zookeeper.yaml
If running on a remote server you will need to add the line
servers: "0.0.0.0:2181" to your configuration. If ZooKeeper is running on another hostname or port then you will need to edit the configuration to reflect this.
Save your changes and return to the command prompt.
- Restart the agent after any configuration changes have been made:
$ sudo service appoptics-snapteld restart
- Enable the ZooKeeper plugin
On the Integrations Page you will see ZooKeeper available if the previous steps were successful. It may take a couple minutes before the ZooKeeper plugin is identified.
Select the ZooKeeper plugin to open the configuration menu in the UI, and enable the plugin. If you do not see the plugin, see Troubleshooting.
The table below outlines the default set of metrics collected by the ZooKeeper plugin.
|zookeeper.approximate_data_size||Size of data in bytes that a zookeeper server has in its data tree|
|zookeeper.avg_latency||Average time in milliseconds for requests to be processed|
|zookeeper.ephemerals_count||Number of ephemeral nodes that a zookeeper server has in its data tree|
|zookeeper.max_file_descriptor_count||Maximum number of file descriptors that a zookeeper server can open|
|zookeeper.max_latency||Maximum time in milliseconds for a request to be processed|
|zookeeper.min_latency||Minimum time in milliseconds for a request to be processed|
|zookeeper.num_alive_connections||Number of active clients connected to a zookeeper server|
|zookeeper.open_file_descriptor_count||Number of file descriptors that a zookeeper server has open|
|zookeeper.outstanding_requests||Number of currently executing requests|
|zookeeper.packets_received||Count of the number of zookeeper packets received by a server|
|zookeeper.packets_sent||Count of the number of zookeeper packets sent from a server|
|zookeeper.watch_count||Number of watches placed on z-nodes on a zookeeper server|
|zookeeper.znode_count||Number of z-nodes that a zookeeper server has in its data tree|