ZooKeeper
Overview
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.
Setup
The zookeeper
monitoring is accomplished by bridge
plugin which is included with the SolarWinds Snap Agent by default. Follow the directions below to enable it for an agent instance.
The bridge
plugin utilize Telegraf ZooKeeper plugin.
Prerequisites
You will need to install and run ZooKeeper.
Configuration
The agent provides an example task file to help you get started quickly, but requires you to provide the correct settings for your ZooKeeper installation. To enable the task:
-
Make a copy of the ZooKeeper example task file
task-bridge-zookeeper.yaml.example
in foldertasks-autoload.d
, renaming it totask-bridge-zookeeper.yaml
:On Windows, using Explorer or PowerShell:
copy "C:\ProgramData\SolarWinds\Snap\tasks-autoload.d\task-bridge-zookeeper.yaml.example" "C:\ProgramData\SolarWinds\Snap\tasks-autoload.d\task-bridge-zookeeper.yaml"
On Linux using command line:
sudo cp -p /opt/SolarWinds/Snap/etc/tasks-autoload.d/task-bridge-zookeeper.yaml.example /opt/SolarWinds/Snap/etc/tasks-autoload.d/task-bridge-zookeeper.yaml
-
Edit the task file with settings specific to your ZooKeeper configuration:
In this configuration you'll notice that it is already configured to listen on
localhost:2181
:If you wish to also collect logs for this service, uncomment the last section in the example task file. For more information on collecting logs, see the logs collector docs.
--- version: 2 schedule: type: cron interval: "0 * * * * *" plugins: - plugin_name: bridge config: zookeeper: ## 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: - ":2181" ## Optional TLS Config # enable_ssl: true # tls_ca: /path/to/cafile # tls_cert: /path/to/certfile # tls_key: /path/to/keyfile ## If false, skip chain & host verification # insecure_skip_verify: true publish: - plugin_name: publisher-appoptics ## If you want to gather logs for this integration, uncomment the following section. # - plugin_name: log-files # config: # file_paths: # - /var/log/zookeeper.log # publish: # - plugin_name: loggly-http-bulk
If running on a remote server you will need modify servers setting in your configuration:
servers:
- "0.0.0.0:2181"
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:
On Windows command line:
net stop swisnapd net start swisnapd
On Linux command line:
sudo service swisnapd restart
-
Enable the ZooKeeper integration in AppOptics
On the Integrations Page you will see ZooKeeper available if the previous steps were successful. It may take a couple minutes before the ZooKeeper integration is identified. Select the ZooKeeper integration to open the configuration menu in the UI, and enable it. If you do not see it, see Troubleshooting Linux.
Testing Integration
To check if and what metrics can be collected with given configuration, run bridge
plugin in debug mode:
On Windows command line:
"C:\Program Files\SolarWinds\Snap\bin\snap-plugin-collector-bridge.exe" --debug-mode --plugin-config "{\"zookeeper\": {\"servers\": [\":2181\"]}}"
On Linux command line:
/opt/SolarWinds/Snap/bin/snap-plugin-collector-bridge --debug-mode --plugin-config "{\"zookeeper\": {\"servers\": [\":2181\"]}}"
Metrics and Tags
Metrics
The table below outlines the default set of metrics collected by the ZooKeeper integration.
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 |
zookeeper.followers | Number of followers (reported only for leader) |
zookeeper.pending_syncs | Number of pending synchronization operations (reported only fro leader) |
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 |
server | The address of ZooKeeper server |
state | The current ZooKeeper configuration (Standalone or Distributed mode) |
Navigation Notice: When the APM Integrated Experience is enabled, AppOptics shares a common navigation and enhanced feature set with other integrated experience products. How you navigate AppOptics and access its features may vary from these instructions.
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.