github.com/netdata/go.d.plugin@v0.58.1/modules/zookeeper/integrations/zookeeper.md (about) 1 <!--startmeta 2 custom_edit_url: "https://github.com/netdata/go.d.plugin/edit/master/modules/zookeeper/README.md" 3 meta_yaml: "https://github.com/netdata/go.d.plugin/edit/master/modules/zookeeper/metadata.yaml" 4 sidebar_label: "ZooKeeper" 5 learn_status: "Published" 6 learn_rel_path: "Data Collection/Service Discovery / Registry" 7 most_popular: False 8 message: "DO NOT EDIT THIS FILE DIRECTLY, IT IS GENERATED BY THE COLLECTOR'S metadata.yaml FILE" 9 endmeta--> 10 11 # ZooKeeper 12 13 14 <img src="https://netdata.cloud/img/zookeeper.svg" width="150"/> 15 16 17 Plugin: go.d.plugin 18 Module: zookeeper 19 20 <img src="https://img.shields.io/badge/maintained%20by-Netdata-%2300ab44" /> 21 22 ## Overview 23 24 25 26 It connects to the Zookeeper instance via a TCP and executes the following commands: 27 28 - [mntr](https://zookeeper.apache.org/doc/r3.4.8/zookeeperAdmin.html#sc_zkCommands). 29 30 31 This collector is supported on all platforms. 32 33 This collector supports collecting metrics from multiple instances of this integration, including remote instances. 34 35 36 ### Default Behavior 37 38 #### Auto-Detection 39 40 By default, it detects instances running on localhost by attempting to connect using known ZooKeeper TCP sockets: 41 42 - 127.0.0.1:2181 43 - 127.0.0.1:2182 44 45 46 #### Limits 47 48 The default configuration for this integration does not impose any limits on data collection. 49 50 #### Performance Impact 51 52 The default configuration for this integration is not expected to impose a significant performance impact on the system. 53 54 55 ## Metrics 56 57 Metrics grouped by *scope*. 58 59 The scope defines the instance that the metric belongs to. An instance is uniquely identified by a set of labels. 60 61 62 63 ### Per ZooKeeper instance 64 65 These metrics refer to the entire monitored application. 66 67 This scope has no labels. 68 69 Metrics: 70 71 | Metric | Dimensions | Unit | 72 |:------|:----------|:----| 73 | zookeeper.requests | outstanding | requests | 74 | zookeeper.requests_latency | min, avg, max | ms | 75 | zookeeper.connections | alive | connections | 76 | zookeeper.packets | received, sent | pps | 77 | zookeeper.file_descriptor | open | file descriptors | 78 | zookeeper.nodes | znode, ephemerals | nodes | 79 | zookeeper.watches | watches | watches | 80 | zookeeper.approximate_data_size | size | KiB | 81 | zookeeper.server_state | state | state | 82 83 84 85 ## Alerts 86 87 There are no alerts configured by default for this integration. 88 89 90 ## Setup 91 92 ### Prerequisites 93 94 #### Whitelist `mntr` command 95 96 Add `mntr` to Zookeeper's [4lw.commands.whitelist](https://zookeeper.apache.org/doc/current/zookeeperAdmin.html#sc_4lw). 97 98 99 100 ### Configuration 101 102 #### File 103 104 The configuration file name for this integration is `go.d/zookeeper.conf`. 105 106 107 You can edit the configuration file using the `edit-config` script from the 108 Netdata [config directory](https://github.com/netdata/netdata/blob/master/docs/configure/nodes.md#the-netdata-config-directory). 109 110 ```bash 111 cd /etc/netdata 2>/dev/null || cd /opt/netdata/etc/netdata 112 sudo ./edit-config go.d/zookeeper.conf 113 ``` 114 #### Options 115 116 The following options can be defined globally: update_every, autodetection_retry. 117 118 119 <details><summary>Config options</summary> 120 121 | Name | Description | Default | Required | 122 |:----|:-----------|:-------|:--------:| 123 | update_every | Data collection frequency. | 1 | no | 124 | autodetection_retry | Recheck interval in seconds. Zero means no recheck will be scheduled. | 0 | no | 125 | address | Server address. The format is IP:PORT. | 127.0.0.1:2181 | yes | 126 | timeout | Connection/read/write/ssl handshake timeout. | 1 | no | 127 | use_tls | Whether to use TLS or not. | no | no | 128 | tls_skip_verify | Server certificate chain and hostname validation policy. Controls whether the client performs this check. | no | no | 129 | tls_ca | Certification authority that the client uses when verifying the server's certificates. | | no | 130 | tls_cert | Client TLS certificate. | | no | 131 | tls_key | Client TLS key. | | no | 132 133 </details> 134 135 #### Examples 136 137 ##### Basic 138 139 Local server. 140 141 <details><summary>Config</summary> 142 143 ```yaml 144 jobs: 145 - name: local 146 address: 127.0.0.1:2181 147 148 ``` 149 </details> 150 151 ##### TLS with self-signed certificate 152 153 Zookeeper with TLS and self-signed certificate. 154 155 <details><summary>Config</summary> 156 157 ```yaml 158 jobs: 159 - name: local 160 address: 127.0.0.1:2181 161 use_tls: yes 162 tls_skip_verify: yes 163 164 ``` 165 </details> 166 167 ##### Multi-instance 168 169 > **Note**: When you define multiple jobs, their names must be unique. 170 171 Collecting metrics from local and remote instances. 172 173 174 <details><summary>Config</summary> 175 176 ```yaml 177 jobs: 178 - name: local 179 address: 127.0.0.1:2181 180 181 - name: remote 182 address: 192.0.2.1:2181 183 184 ``` 185 </details> 186 187 188 189 ## Troubleshooting 190 191 ### Debug Mode 192 193 To troubleshoot issues with the `zookeeper` collector, run the `go.d.plugin` with the debug option enabled. The output 194 should give you clues as to why the collector isn't working. 195 196 - Navigate to the `plugins.d` directory, usually at `/usr/libexec/netdata/plugins.d/`. If that's not the case on 197 your system, open `netdata.conf` and look for the `plugins` setting under `[directories]`. 198 199 ```bash 200 cd /usr/libexec/netdata/plugins.d/ 201 ``` 202 203 - Switch to the `netdata` user. 204 205 ```bash 206 sudo -u netdata -s 207 ``` 208 209 - Run the `go.d.plugin` to debug the collector: 210 211 ```bash 212 ./go.d.plugin -d -m zookeeper 213 ``` 214 215