Source: https://git.zabbix.com/projects/ZBX/repos/zabbix/browse/templates/app/zookeeper_http?at=release/6.0
Zookeeper by HTTP
Overview
For Zabbix version: 6.0 and higher
The template to monitor Apache Zookeeper by Zabbix that work without any external scripts.
Most of the metrics are collected in one go, thanks to Zabbix bulk data collection.
This template was tested on:
- Apache Zookeeper, version 3.6+
Setup
See Zabbix template operation for basic instructions.
This template works with standalone and cluster instances. Metrics are collected from each Zookeper node by requests to AdminServer. By default AdminServer is enabled and listens on port 8080. You can enable or configure AdminServer parameters according official documentations. Don't forget to change macros {$ZOOKEEPER.COMMAND_URL}, {$ZOOKEEPER.PORT}, {$ZOOKEEPER.SCHEME}.
Zabbix configuration
No specific Zabbix configuration is required.
Macros used
Name | Description | Default |
---|---|---|
{$ZOOKEEPER.COMMAND_URL} | The URL for listing and issuing commands relative to the root URL (admin.commandURL). |
commands |
{$ZOOKEEPER.FILE_DESCRIPTORS.MAX.WARN} | Maximum percentage of file descriptors usage alert threshold (for trigger expression). |
85 |
{$ZOOKEEPER.OUTSTANDING_REQ.MAX.WARN} | Maximum number of outstanding requests (for trigger expression). |
10 |
{$ZOOKEEPER.PENDING_SYNCS.MAX.WARN} | Maximum number of pending syncs from the followers (for trigger expression). |
10 |
{$ZOOKEEPER.PORT} | The port the embedded Jetty server listens on (admin.serverPort). |
8080 |
{$ZOOKEEPER.SCHEME} | Request scheme which may be http or https |
http |
Template links
There are no template links in this template.
Discovery rules
Name | Description | Type | Key and additional info |
---|---|---|---|
Clients discovery | Get list of client connections. Note, depending on the number of client connections this operation may be expensive (i.e. impact server performance). |
HTTP_AGENT | zookeeper.clients Preprocessing: - JAVASCRIPT: |
Leader metrics discovery | Additional metrics for leader node |
DEPENDENT | zookeeper.metrics.leader Preprocessing: - JSONPATH: - JAVASCRIPT: |
Items collected
Group | Name | Description | Type | Key and additional info |
---|---|---|---|---|
Zabbix raw items | Zookeeper: Get server metrics | - |
HTTP_AGENT | zookeeper.get_metrics |
Zabbix raw items | Zookeeper: Get connections stats | Get information on client connections to server. Note, depending on the number of client connections this operation may be expensive (i.e. impact server performance). |
HTTP_AGENT | zookeeper.get_connections_stats |
Zookeeper | Zookeeper: Server mode | Mode of the server. In an ensemble, this may either be leader or follower. Otherwise, it is standalone |
DEPENDENT | zookeeper.server_state Preprocessing: - JSONPATH: - DISCARD_UNCHANGED_HEARTBEAT: |
Zookeeper | Zookeeper: Uptime | Uptime of Zookeeper server. |
DEPENDENT | zookeeper.uptime Preprocessing: - JSONPATH: - MULTIPLIER: |
Zookeeper | Zookeeper: Version | Version of Zookeeper server. |
DEPENDENT | zookeeper.version Preprocessing: - JSONPATH: - REGEX: - DISCARD_UNCHANGED_HEARTBEAT: |
Zookeeper | Zookeeper: Approximate data size | Data tree size in bytes.The size includes the znode path and its value. |
DEPENDENT | zookeeper.approximate_data_size Preprocessing: - JSONPATH: |
Zookeeper | Zookeeper: File descriptors, max | Maximum number of file descriptors that a zookeeper server can open. |
DEPENDENT | zookeeper.max_file_descriptor_count Preprocessing: - JSONPATH: - DISCARD_UNCHANGED_HEARTBEAT: |
Zookeeper | Zookeeper: File descriptors, open | Number of file descriptors that a zookeeper server has open. |
DEPENDENT | zookeeper.open_file_descriptor_count Preprocessing: - JSONPATH: |
Zookeeper | Zookeeper: Outstanding requests | The number of queued requests when the server is under load and is receiving more sustained requests than it can process. |
DEPENDENT | zookeeper.outstanding_requests Preprocessing: - JSONPATH: |
Zookeeper | Zookeeper: Commit per sec | The number of commits performed per second |
DEPENDENT | zookeeper.commit_count.rate Preprocessing: - JSONPATH: - CHANGE_PER_SECOND |
Zookeeper | Zookeeper: Diff syncs per sec | Number of diff syncs performed per second |
DEPENDENT | zookeeper.diff_count.rate Preprocessing: - JSONPATH: - CHANGE_PER_SECOND |
Zookeeper | Zookeeper: Snap syncs per sec | Number of snap syncs performed per second |
DEPENDENT | zookeeper.snap_count.rate Preprocessing: - JSONPATH: - CHANGE_PER_SECOND |
Zookeeper | Zookeeper: Looking per sec | Rate of transitions into looking state. |
DEPENDENT | zookeeper.looking_count.rate Preprocessing: - JSONPATH: - CHANGE_PER_SECOND |
Zookeeper | Zookeeper: Alive connections | Number of active clients connected to a zookeeper server. |
DEPENDENT | zookeeper.num_alive_connections Preprocessing: - JSONPATH: |
Zookeeper | Zookeeper: Global sessions | Number of global sessions. |
DEPENDENT | zookeeper.global_sessions Preprocessing: - JSONPATH: |
Zookeeper | Zookeeper: Local sessions | Number of local sessions. |
DEPENDENT | zookeeper.local_sessions Preprocessing: - JSONPATH: |
Zookeeper | Zookeeper: Drop connections per sec | Rate of connection drops. |
DEPENDENT | zookeeper.connection_drop_count.rate Preprocessing: - JSONPATH: - CHANGE_PER_SECOND |
Zookeeper | Zookeeper: Rejected connections per sec | Rate of connection rejected. |
DEPENDENT | zookeeper.connection_rejected.rate Preprocessing: - JSONPATH: - CHANGE_PER_SECOND |
Zookeeper | Zookeeper: Revalidate connections per sec | Rate ofconnection revalidations. |
DEPENDENT | zookeeper.connection_revalidate_count.rate Preprocessing: - JSONPATH: - CHANGE_PER_SECOND |
Zookeeper | Zookeeper: Revalidate per sec | Rate of revalidations. |
DEPENDENT | zookeeper.revalidate_count.rate Preprocessing: - JSONPATH: - CHANGE_PER_SECOND |
Zookeeper | Zookeeper: Latency, max | The maximum amount of time it takes for the server to respond to a client request. |
DEPENDENT | zookeeper.max_latency Preprocessing: - JSONPATH: |
Zookeeper | Zookeeper: Latency, min | The minimum amount of time it takes for the server to respond to a client request. |
DEPENDENT | zookeeper.min_latency Preprocessing: - JSONPATH: |
Zookeeper | Zookeeper: Latency, avg | The average amount of time it takes for the server to respond to a client request. |
DEPENDENT | zookeeper.avg_latency Preprocessing: - JSONPATH: |
Zookeeper | Zookeeper: Znode count | The number of znodes in the ZooKeeper namespace (the data) |
DEPENDENT | zookeeper.znode_count Preprocessing: - JSONPATH: - DISCARD_UNCHANGED_HEARTBEAT: |
Zookeeper | Zookeeper: Ephemeral nodes count | Number of ephemeral nodes that a zookeeper server has in its data tree. |
DEPENDENT | zookeeper.ephemerals_count Preprocessing: - JSONPATH: |
Zookeeper | Zookeeper: Watch count | Number of watches currently set on the local ZooKeeper process. |
DEPENDENT | zookeeper.watch_count Preprocessing: - JSONPATH: |
Zookeeper | Zookeeper: Packets sent per sec | The number of zookeeper packets sent from a server per second. |
DEPENDENT | zookeeper.packets_sent Preprocessing: - JSONPATH: - CHANGE_PER_SECOND |
Zookeeper | Zookeeper: Packets received per sec | The number of zookeeper packets received by a server per second. |
DEPENDENT | zookeeper.packets_received.rate Preprocessing: - JSONPATH: - CHANGE_PER_SECOND |
Zookeeper | Zookeeper: Bytes received per sec | Number of bytes received per second. |
DEPENDENT | zookeeper.bytes_received_count.rate Preprocessing: - JSONPATH: - CHANGE_PER_SECOND |
Zookeeper | Zookeeper: Election time, avg | Time between entering and leaving election. |
DEPENDENT | zookeeper.avg_election_time Preprocessing: - JAVASCRIPT: |
Zookeeper | Zookeeper: Elections | Number of elections happened. |
DEPENDENT | zookeeper.cnt_election_time Preprocessing: - JAVASCRIPT: |
Zookeeper | Zookeeper: Fsync time, avg | Time to fsync transaction log. |
DEPENDENT | zookeeper.avg_fsynctime Preprocessing: - JAVASCRIPT: |
Zookeeper | Zookeeper: Fsync | Count of performed fsyncs. |
DEPENDENT | zookeeper.cnt_fsynctime Preprocessing: - JAVASCRIPT: |
Zookeeper | Zookeeper: Snapshot write time, avg | Average time to write a snapshot. |
DEPENDENT | zookeeper.avg_snapshottime Preprocessing: - JAVASCRIPT: |
Zookeeper | Zookeeper: Snapshot writes | Count of performed snapshot writes. |
DEPENDENT | zookeeper.cnt_snapshottime Preprocessing: - JAVASCRIPT: |
Zookeeper | Zookeeper: Pending syncs{#SINGLETON} | Number of pending syncs to carry out to ZooKeeper ensemble followers. |
DEPENDENT | zookeeper.pending_syncs[{#SINGLETON}] Preprocessing: - JSONPATH: |
Zookeeper | Zookeeper: Quorum size{#SINGLETON} | - |
DEPENDENT | zookeeper.quorum_size[{#SINGLETON}] Preprocessing: - JSONPATH: |
Zookeeper | Zookeeper: Synced followers{#SINGLETON} | Number of synced followers reported when a node server_state is leader. |
DEPENDENT | zookeeper.synced_followers[{#SINGLETON}] Preprocessing: - JSONPATH: |
Zookeeper | Zookeeper: Synced non-voting follower{#SINGLETON} | Number of synced voting followers reported when a node server_state is leader. |
DEPENDENT | zookeeper.synced_non_voting_followers[{#SINGLETON}] Preprocessing: - JSONPATH: |
Zookeeper | Zookeeper: Synced observers{#SINGLETON} | Number of synced observers. |
DEPENDENT | zookeeper.synced_observers[{#SINGLETON}] Preprocessing: - JSONPATH: |
Zookeeper | Zookeeper: Learners{#SINGLETON} | Number of learners. |
DEPENDENT | zookeeper.learners[{#SINGLETON}] Preprocessing: - JSONPATH: |
Zookeeper | Zookeeper client {#TYPE} [{#CLIENT}]: Latency, max | The maximum amount of time it takes for the server to respond to a client request. |
DEPENDENT | zookeeper.max_latency[{#TYPE},{#CLIENT}] Preprocessing: - JSONPATH: |
Zookeeper | Zookeeper client {#TYPE} [{#CLIENT}]: Latency, min | The minimum amount of time it takes for the server to respond to a client request. |
DEPENDENT | zookeeper.min_latency[{#TYPE},{#CLIENT}] Preprocessing: - JSONPATH: |
Zookeeper | Zookeeper client {#TYPE} [{#CLIENT}]: Latency, avg | The average amount of time it takes for the server to respond to a client request. |
DEPENDENT | zookeeper.avg_latency[{#TYPE},{#CLIENT}] Preprocessing: - JSONPATH: |
Zookeeper | Zookeeper client {#TYPE} [{#CLIENT}]: Packets sent per sec | The number of packets sent. |
DEPENDENT | zookeeper.packets_sent[{#TYPE},{#CLIENT}] Preprocessing: - JSONPATH: - CHANGE_PER_SECOND |
Zookeeper | Zookeeper client {#TYPE} [{#CLIENT}]: Packets received per sec | The number of packets received. |
DEPENDENT | zookeeper.packets_received[{#TYPE},{#CLIENT}] Preprocessing: - JSONPATH: - CHANGE_PER_SECOND |
Zookeeper | Zookeeper client {#TYPE} [{#CLIENT}]: Outstanding requests | The number of queued requests when the server is under load and is receiving more sustained requests than it can process. |
DEPENDENT | zookeeper.outstanding_requests[{#TYPE},{#CLIENT}] Preprocessing: - JSONPATH: |
Triggers
Name | Description | Expression | Severity | Dependencies and additional info |
---|---|---|---|---|
Zookeeper: Server mode has changed | Zookeeper node state has changed. Ack to close. |
last(/Zookeeper by HTTP/zookeeper.server_state,#1)<>last(/Zookeeper by HTTP/zookeeper.server_state,#2) and length(last(/Zookeeper by HTTP/zookeeper.server_state))>0 |
INFO | Manual close: YES |
Zookeeper: has been restarted | Uptime is less than 10 minutes |
last(/Zookeeper by HTTP/zookeeper.uptime)<10m |
INFO | Manual close: YES |
Zookeeper: Failed to fetch info data | Zabbix has not received data for items for the last 10 minutes |
nodata(/Zookeeper by HTTP/zookeeper.uptime,10m)=1 |
WARNING | Manual close: YES |
Zookeeper: Version has changed | Zookeeper version has changed. Ack to close. |
last(/Zookeeper by HTTP/zookeeper.version,#1)<>last(/Zookeeper by HTTP/zookeeper.version,#2) and length(last(/Zookeeper by HTTP/zookeeper.version))>0 |
INFO | Manual close: YES |
Zookeeper: Too many file descriptors used | Number of file descriptors used more than {$ZOOKEEPER.FILE_DESCRIPTORS.MAX.WARN}% of the available number of file descriptors. |
min(/Zookeeper by HTTP/zookeeper.open_file_descriptor_count,5m) * 100 / last(/Zookeeper by HTTP/zookeeper.max_file_descriptor_count) > {$ZOOKEEPER.FILE_DESCRIPTORS.MAX.WARN} |
WARNING | |
Zookeeper: Too many queued requests | Number of queued requests in the server. This goes up when the server receives more requests than it can process. |
min(/Zookeeper by HTTP/zookeeper.outstanding_requests,5m)>{$ZOOKEEPER.OUTSTANDING_REQ.MAX.WARN} |
AVERAGE | Manual close: YES |
Zookeeper: Too many pending syncs | - |
min(/Zookeeper by HTTP/zookeeper.pending_syncs[{#SINGLETON}],5m)>{$ZOOKEEPER.PENDING_SYNCS.MAX.WARN} |
AVERAGE | Manual close: YES |
Zookeeper: Too few active followers | The number of followers should equal the total size of your ZooKeeper ensemble, minus 1 (the leader is not included in the follower count). If the ensemble fails to maintain quorum, all automatic failover features are suspended. |
last(/Zookeeper by HTTP/zookeeper.synced_followers[{#SINGLETON}]) < last(/Zookeeper by HTTP/zookeeper.quorum_size[{#SINGLETON}])-1 |
AVERAGE |
Feedback
Please report any issues with the template at https://support.zabbix.com
You can also provide feedback, discuss the template or ask for help with it at ZABBIX forums.