github.com/netdata/go.d.plugin@v0.58.1/modules/prometheus/integrations/fastd.md (about) 1 <!--startmeta 2 custom_edit_url: "https://github.com/netdata/go.d.plugin/edit/master/modules/prometheus/integrations/fastd.md" 3 meta_yaml: "https://github.com/netdata/go.d.plugin/edit/master/modules/prometheus/metadata.yaml" 4 sidebar_label: "Fastd" 5 learn_status: "Published" 6 learn_rel_path: "Data Collection/VPNs" 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 # Fastd 12 13 14 <img src="https://netdata.cloud/img/fastd.png" 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 Monitor Fastd VPN metrics for efficient virtual private network management and performance. 25 26 27 Metrics are gathered by periodically sending HTTP requests to [Fastd Exporter](https://github.com/freifunk-darmstadt/fastd-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 #### Install Exporter 86 87 Install [Fastd Exporter](https://github.com/freifunk-darmstadt/fastd-exporter) by following the instructions mentioned in the exporter README. 88 89 90 91 ### Configuration 92 93 #### File 94 95 The configuration file name for this integration is `go.d/prometheus.conf`. 96 97 98 You can edit the configuration file using the `edit-config` script from the 99 Netdata [config directory](https://github.com/netdata/netdata/blob/master/docs/configure/nodes.md#the-netdata-config-directory). 100 101 ```bash 102 cd /etc/netdata 2>/dev/null || cd /opt/netdata/etc/netdata 103 sudo ./edit-config go.d/prometheus.conf 104 ``` 105 #### Options 106 107 The following options can be defined globally: update_every, autodetection_retry. 108 109 110 <details><summary>Config options</summary> 111 112 | Name | Description | Default | Required | 113 |:----|:-----------|:-------|:--------:| 114 | update_every | Data collection frequency. | 10 | no | 115 | autodetection_retry | Recheck interval in seconds. Zero means no recheck will be scheduled. | 0 | no | 116 | url | Server URL. | | yes | 117 | selector | Time series selector (filter). | | no | 118 | fallback_type | Time series selector (filter). | | no | 119 | max_time_series | Global time series limit. If an endpoint returns number of time series > limit the data is not processed. | 2000 | no | 120 | max_time_series_per_metric | Time series per metric (metric name) limit. Metrics with number of time series > limit are skipped. | 200 | no | 121 | timeout | HTTP request timeout. | 10 | no | 122 | username | Username for basic HTTP authentication. | | no | 123 | password | Password for basic HTTP authentication. | | no | 124 | proxy_url | Proxy URL. | | no | 125 | proxy_username | Username for proxy basic HTTP authentication. | | no | 126 | proxy_password | Password for proxy basic HTTP authentication. | | no | 127 | method | HTTP request method. | GET | no | 128 | body | HTTP request body. | | no | 129 | headers | HTTP request headers. | | no | 130 | not_follow_redirects | Redirect handling policy. Controls whether the client follows redirects. | no | no | 131 | tls_skip_verify | Server certificate chain and hostname validation policy. Controls whether the client performs this check. | no | no | 132 | tls_ca | Certification authority that the client uses when verifying the server's certificates. | | no | 133 | tls_cert | Client TLS certificate. | | no | 134 | tls_key | Client TLS key. | | no | 135 136 ##### selector 137 138 This option allows you to filter out unwanted time series. Only metrics matching the selector will be collected. 139 140 - Logic: (pattern1 OR pattern2) AND !(pattern3 or pattern4) 141 - Pattern syntax: [selector](https://github.com/netdata/go.d.plugin/blob/master/pkg/prometheus/selector/README.md). 142 - Option syntax: 143 144 ```yaml 145 selector: 146 allow: 147 - pattern1 148 - pattern2 149 deny: 150 - pattern3 151 - pattern4 152 ``` 153 154 155 ##### fallback_type 156 157 This option allows you to process Untyped metrics as Counter or Gauge instead of ignoring them. 158 159 - Metric name pattern syntax: [shell file name pattern](https://golang.org/pkg/path/filepath/#Match). 160 - Option syntax: 161 162 ```yaml 163 fallback_type: 164 counter: 165 - metric_name_pattern1 166 - metric_name_pattern2 167 gauge: 168 - metric_name_pattern3 169 - metric_name_pattern4 170 ``` 171 172 173 </details> 174 175 #### Examples 176 177 ##### Basic 178 179 > **Note**: Change the port of the monitored application on which it provides metrics. 180 181 A basic example configuration. 182 183 184 ```yaml 185 jobs: 186 - name: local 187 url: http://127.0.0.1:9090/metrics 188 189 ``` 190 ##### Read metrics from a file 191 192 An example configuration to read metrics from a file. 193 194 <details><summary>Config</summary> 195 196 ```yaml 197 # use "file://" scheme 198 jobs: 199 - name: myapp 200 url: file:///opt/metrics/myapp/metrics.txt 201 202 ``` 203 </details> 204 205 ##### HTTP authentication 206 207 > **Note**: Change the port of the monitored application on which it provides metrics. 208 209 Basic HTTP authentication. 210 211 212 <details><summary>Config</summary> 213 214 ```yaml 215 jobs: 216 - name: local 217 url: http://127.0.0.1:9090/metrics 218 username: username 219 password: password 220 221 ``` 222 </details> 223 224 ##### HTTPS with self-signed certificate 225 226 > **Note**: Change the port of the monitored application on which it provides metrics. 227 228 Do not validate server certificate chain and hostname. 229 230 231 <details><summary>Config</summary> 232 233 ```yaml 234 jobs: 235 - name: local 236 url: https://127.0.0.1:9090/metrics 237 tls_skip_verify: yes 238 239 ``` 240 </details> 241 242 ##### Multi-instance 243 244 > **Note**: When you define multiple jobs, their names must be unique. 245 > **Note**: Change the port of the monitored application on which it provides metrics. 246 247 Collecting metrics from local and remote instances. 248 249 250 <details><summary>Config</summary> 251 252 ```yaml 253 jobs: 254 - name: local 255 url: http://127.0.0.1:9090/metrics 256 257 - name: remote 258 url: http://192.0.2.1:9090/metrics 259 260 ``` 261 </details> 262 263 264 265 ## Troubleshooting 266 267 ### Debug Mode 268 269 To troubleshoot issues with the `prometheus` collector, run the `go.d.plugin` with the debug option enabled. The output 270 should give you clues as to why the collector isn't working. 271 272 - Navigate to the `plugins.d` directory, usually at `/usr/libexec/netdata/plugins.d/`. If that's not the case on 273 your system, open `netdata.conf` and look for the `plugins` setting under `[directories]`. 274 275 ```bash 276 cd /usr/libexec/netdata/plugins.d/ 277 ``` 278 279 - Switch to the `netdata` user. 280 281 ```bash 282 sudo -u netdata -s 283 ``` 284 285 - Run the `go.d.plugin` to debug the collector: 286 287 ```bash 288 ./go.d.plugin -d -m prometheus 289 ``` 290 291