Zookeeper
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.
Setup
The zookeeper
plugin is included with the SolarWinds Snap Agent by default. Follow the directions below to enable it for a agent instance.
Prerequisites
You will need to install and run ZooKeeper.
Configuration
The 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/SolarWinds/Snap/etc/plugins.d/zookeeper.yaml.example
, renaming it to/opt/SolarWinds/Snap/etc/plugins.d/zookeeper.yaml
:
Copy$ sudo cp /opt/SolarWinds/Snap/etc/plugins.d/zookeeper.yaml.example /opt/SolarWinds/Snap/etc/plugins.d/zookeeper.yaml
- Edit the configuration file with settings specific to your ZooKeeper configuration:
Copy$ sudo nano /opt/SolarWinds/Snap/etc/plugins.d/zookeeper.yaml
In this configuration you'll notice that it is already configured to listen on localhost:2181
:
Copycollector:
# 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:
Copy$ sudo service swisnapd 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 Linux.
Metrics
The table below outlines the default set of metrics collected by the ZooKeeper plugin.
Namespace | Description |
---|---|
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 |
Tags
The table below outlines the default set of tags provided for each metric.
Tags | Description |
---|---|
@host | The hostname of the ZooKeeper server |
port | The port used by the ZooKeeper server |
state | The current ZooKeeper configuration (Standalone or Distributed mode) |
When the APM Integrated Experience is enabled, AppOptics shares a common navigation and enhanced feature set with the other integrated experiences' products. How you navigate AppOptics and access its features may vary from these instructions. For more information, go to the APM Integrated Experience documentation.
The scripts are not supported under any SolarWinds support program or service. The scripts are provided AS IS without warranty of any kind. SolarWinds further disclaims all warranties including, without limitation, any implied warranties of merchantability or of fitness for a particular purpose. The risk arising out of the use or performance of the scripts and documentation stays with you. In no event shall SolarWinds or anyone else involved in the creation, production, or delivery of the scripts be liable for any damages whatsoever (including, without limitation, damages for loss of business profits, business interruption, loss of business information, or other pecuniary loss) arising out of the use of or inability to use the scripts or documentation.