github.com/netdata/go.d.plugin@v0.58.1/modules/prometheus/integrations/etcd.md (about) 1 <!--startmeta 2 custom_edit_url: "https://github.com/netdata/go.d.plugin/edit/master/modules/prometheus/integrations/etcd.md" 3 meta_yaml: "https://github.com/netdata/go.d.plugin/edit/master/modules/prometheus/metadata.yaml" 4 sidebar_label: "etcd" 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 # etcd 12 13 14 <img src="https://netdata.cloud/img/etcd.svg" width="150"/> 15 16 17 Plugin: go.d.plugin 18 Module: prometheus 19 20 <img src="https://img.shields.io/badge/maintained%20by-Community-blue" /> 21 22 ## Overview 23 24 Track etcd database metrics for optimized distributed key-value store management and performance. 25 26 27 Metrics are gathered by periodically sending HTTP requests to etcd built-in Prometheus exporter. 28 29 30 This collector is supported on all platforms. 31 32 This collector supports collecting metrics from multiple instances of this integration, including remote instances. 33 34 35 ### Default Behavior 36 37 #### Auto-Detection 38 39 By default, it detects instances running on the local host by trying to connect to known ports that are [allocated to exporters](https://github.com/prometheus/prometheus/wiki/Default-port-allocations). 40 The full list of endpoints is available in the collector's [configuration file](https://github.com/netdata/go.d.plugin/blob/master/config/go.d/prometheus.conf). 41 42 43 #### Limits 44 45 The default configuration for this integration does not impose any limits on data collection. 46 47 #### Performance Impact 48 49 The default configuration for this integration is not expected to impose a significant performance impact on the system. 50 51 52 ## Metrics 53 54 This collector has built-in grouping logic based on the [type of metrics](https://prometheus.io/docs/concepts/metric_types/). 55 56 | Metric | Chart | Dimension(s) | Algorithm | 57 |---------------------------|-------------------------------------------|----------------------|-------------| 58 | Gauge | for each label set | one, the metric name | absolute | 59 | Counter | for each label set | one, the metric name | incremental | 60 | Summary (quantiles) | for each label set (excluding 'quantile') | for each quantile | absolute | 61 | Summary (sum and count) | for each label set | the metric name | incremental | 62 | Histogram (buckets) | for each label set (excluding 'le') | for each bucket | incremental | 63 | Histogram (sum and count) | for each label set | the metric name | incremental | 64 65 Untyped metrics (have no '# TYPE') processing: 66 67 - As Counter or Gauge depending on pattern match when 'fallback_type' is used. 68 - As Counter if it has suffix '_total'. 69 - As Summary if it has 'quantile' label. 70 - As Histogram if it has 'le' label. 71 72 **The rest are ignored**. 73 74 75 76 ## Alerts 77 78 There are no alerts configured by default for this integration. 79 80 81 ## Setup 82 83 ### Prerequisites 84 85 No action required. 86 87 ### Configuration 88 89 #### File 90 91 The configuration file name for this integration is `go.d/prometheus.conf`. 92 93 94 You can edit the configuration file using the `edit-config` script from the 95 Netdata [config directory](https://github.com/netdata/netdata/blob/master/docs/configure/nodes.md#the-netdata-config-directory). 96 97 ```bash 98 cd /etc/netdata 2>/dev/null || cd /opt/netdata/etc/netdata 99 sudo ./edit-config go.d/prometheus.conf 100 ``` 101 #### Options 102 103 The following options can be defined globally: update_every, autodetection_retry. 104 105 106 <details><summary>Config options</summary> 107 108 | Name | Description | Default | Required | 109 |:----|:-----------|:-------|:--------:| 110 | update_every | Data collection frequency. | 10 | no | 111 | autodetection_retry | Recheck interval in seconds. Zero means no recheck will be scheduled. | 0 | no | 112 | url | Server URL. | | yes | 113 | selector | Time series selector (filter). | | no | 114 | fallback_type | Time series selector (filter). | | no | 115 | max_time_series | Global time series limit. If an endpoint returns number of time series > limit the data is not processed. | 2000 | no | 116 | max_time_series_per_metric | Time series per metric (metric name) limit. Metrics with number of time series > limit are skipped. | 200 | no | 117 | timeout | HTTP request timeout. | 10 | no | 118 | username | Username for basic HTTP authentication. | | no | 119 | password | Password for basic HTTP authentication. | | no | 120 | proxy_url | Proxy URL. | | no | 121 | proxy_username | Username for proxy basic HTTP authentication. | | no | 122 | proxy_password | Password for proxy basic HTTP authentication. | | no | 123 | method | HTTP request method. | GET | no | 124 | body | HTTP request body. | | no | 125 | headers | HTTP request headers. | | no | 126 | not_follow_redirects | Redirect handling policy. Controls whether the client follows redirects. | no | no | 127 | tls_skip_verify | Server certificate chain and hostname validation policy. Controls whether the client performs this check. | no | no | 128 | tls_ca | Certification authority that the client uses when verifying the server's certificates. | | no | 129 | tls_cert | Client TLS certificate. | | no | 130 | tls_key | Client TLS key. | | no | 131 132 ##### selector 133 134 This option allows you to filter out unwanted time series. Only metrics matching the selector will be collected. 135 136 - Logic: (pattern1 OR pattern2) AND !(pattern3 or pattern4) 137 - Pattern syntax: [selector](https://github.com/netdata/go.d.plugin/blob/master/pkg/prometheus/selector/README.md). 138 - Option syntax: 139 140 ```yaml 141 selector: 142 allow: 143 - pattern1 144 - pattern2 145 deny: 146 - pattern3 147 - pattern4 148 ``` 149 150 151 ##### fallback_type 152 153 This option allows you to process Untyped metrics as Counter or Gauge instead of ignoring them. 154 155 - Metric name pattern syntax: [shell file name pattern](https://golang.org/pkg/path/filepath/#Match). 156 - Option syntax: 157 158 ```yaml 159 fallback_type: 160 counter: 161 - metric_name_pattern1 162 - metric_name_pattern2 163 gauge: 164 - metric_name_pattern3 165 - metric_name_pattern4 166 ``` 167 168 169 </details> 170 171 #### Examples 172 173 ##### Basic 174 175 > **Note**: Change the port of the monitored application on which it provides metrics. 176 177 A basic example configuration. 178 179 180 ```yaml 181 jobs: 182 - name: local 183 url: http://127.0.0.1:9090/metrics 184 185 ``` 186 ##### Read metrics from a file 187 188 An example configuration to read metrics from a file. 189 190 <details><summary>Config</summary> 191 192 ```yaml 193 # use "file://" scheme 194 jobs: 195 - name: myapp 196 url: file:///opt/metrics/myapp/metrics.txt 197 198 ``` 199 </details> 200 201 ##### HTTP authentication 202 203 > **Note**: Change the port of the monitored application on which it provides metrics. 204 205 Basic HTTP authentication. 206 207 208 <details><summary>Config</summary> 209 210 ```yaml 211 jobs: 212 - name: local 213 url: http://127.0.0.1:9090/metrics 214 username: username 215 password: password 216 217 ``` 218 </details> 219 220 ##### HTTPS with self-signed certificate 221 222 > **Note**: Change the port of the monitored application on which it provides metrics. 223 224 Do not validate server certificate chain and hostname. 225 226 227 <details><summary>Config</summary> 228 229 ```yaml 230 jobs: 231 - name: local 232 url: https://127.0.0.1:9090/metrics 233 tls_skip_verify: yes 234 235 ``` 236 </details> 237 238 ##### Multi-instance 239 240 > **Note**: When you define multiple jobs, their names must be unique. 241 > **Note**: Change the port of the monitored application on which it provides metrics. 242 243 Collecting metrics from local and remote instances. 244 245 246 <details><summary>Config</summary> 247 248 ```yaml 249 jobs: 250 - name: local 251 url: http://127.0.0.1:9090/metrics 252 253 - name: remote 254 url: http://192.0.2.1:9090/metrics 255 256 ``` 257 </details> 258 259 260 261 ## Troubleshooting 262 263 ### Debug Mode 264 265 To troubleshoot issues with the `prometheus` collector, run the `go.d.plugin` with the debug option enabled. The output 266 should give you clues as to why the collector isn't working. 267 268 - Navigate to the `plugins.d` directory, usually at `/usr/libexec/netdata/plugins.d/`. If that's not the case on 269 your system, open `netdata.conf` and look for the `plugins` setting under `[directories]`. 270 271 ```bash 272 cd /usr/libexec/netdata/plugins.d/ 273 ``` 274 275 - Switch to the `netdata` user. 276 277 ```bash 278 sudo -u netdata -s 279 ``` 280 281 - Run the `go.d.plugin` to debug the collector: 282 283 ```bash 284 ./go.d.plugin -d -m prometheus 285 ``` 286 287