github.com/Jeffail/benthos/v3@v3.65.0/website/docs/components/metrics/influxdb.md (about) 1 --- 2 title: influxdb 3 type: metrics 4 status: experimental 5 --- 6 7 <!-- 8 THIS FILE IS AUTOGENERATED! 9 10 To make changes please edit the contents of: 11 lib/metrics/influxdb.go 12 --> 13 14 import Tabs from '@theme/Tabs'; 15 import TabItem from '@theme/TabItem'; 16 17 :::caution EXPERIMENTAL 18 This component is experimental and therefore subject to change or removal outside of major version releases. 19 ::: 20 21 Send metrics to InfluxDB 1.x using the `/write` endpoint. 22 23 Introduced in version 3.36.0. 24 25 26 <Tabs defaultValue="common" values={[ 27 { label: 'Common', value: 'common', }, 28 { label: 'Advanced', value: 'advanced', }, 29 ]}> 30 31 <TabItem value="common"> 32 33 ```yaml 34 # Common config fields, showing default values 35 metrics: 36 influxdb: 37 url: "" 38 db: "" 39 path_mapping: "" 40 ``` 41 42 </TabItem> 43 <TabItem value="advanced"> 44 45 ```yaml 46 # All config fields, showing default values 47 metrics: 48 influxdb: 49 url: "" 50 db: "" 51 tls: 52 enabled: false 53 skip_cert_verify: false 54 enable_renegotiation: false 55 root_cas: "" 56 root_cas_file: "" 57 client_certs: [] 58 username: "" 59 password: "" 60 include: 61 runtime: "" 62 debug_gc: "" 63 interval: 1m 64 ping_interval: 20s 65 precision: s 66 timeout: 5s 67 tags: {} 68 retention_policy: "" 69 write_consistency: "" 70 path_mapping: "" 71 ``` 72 73 </TabItem> 74 </Tabs> 75 76 See https://docs.influxdata.com/influxdb/v1.8/tools/api/#write-http-endpoint for further details on the write API. 77 78 ## Fields 79 80 ### `url` 81 82 A URL of the format `[https|http|udp]://host:port` to the InfluxDB host. 83 84 85 Type: `string` 86 Default: `""` 87 88 ### `db` 89 90 The name of the database to use. 91 92 93 Type: `string` 94 Default: `""` 95 96 ### `tls` 97 98 Custom TLS settings can be used to override system defaults. 99 100 101 Type: `object` 102 103 ### `tls.enabled` 104 105 Whether custom TLS settings are enabled. 106 107 108 Type: `bool` 109 Default: `false` 110 111 ### `tls.skip_cert_verify` 112 113 Whether to skip server side certificate verification. 114 115 116 Type: `bool` 117 Default: `false` 118 119 ### `tls.enable_renegotiation` 120 121 Whether to allow the remote server to repeatedly request renegotiation. Enable this option if you're seeing the error message `local error: tls: no renegotiation`. 122 123 124 Type: `bool` 125 Default: `false` 126 Requires version 3.45.0 or newer 127 128 ### `tls.root_cas` 129 130 An optional root certificate authority to use. This is a string, representing a certificate chain from the parent trusted root certificate, to possible intermediate signing certificates, to the host certificate. 131 132 133 Type: `string` 134 Default: `""` 135 136 ```yaml 137 # Examples 138 139 root_cas: |- 140 -----BEGIN CERTIFICATE----- 141 ... 142 -----END CERTIFICATE----- 143 ``` 144 145 ### `tls.root_cas_file` 146 147 An optional path of a root certificate authority file to use. This is a file, often with a .pem extension, containing a certificate chain from the parent trusted root certificate, to possible intermediate signing certificates, to the host certificate. 148 149 150 Type: `string` 151 Default: `""` 152 153 ```yaml 154 # Examples 155 156 root_cas_file: ./root_cas.pem 157 ``` 158 159 ### `tls.client_certs` 160 161 A list of client certificates to use. For each certificate either the fields `cert` and `key`, or `cert_file` and `key_file` should be specified, but not both. 162 163 164 Type: `array` 165 Default: `[]` 166 167 ```yaml 168 # Examples 169 170 client_certs: 171 - cert: foo 172 key: bar 173 174 client_certs: 175 - cert_file: ./example.pem 176 key_file: ./example.key 177 ``` 178 179 ### `tls.client_certs[].cert` 180 181 A plain text certificate to use. 182 183 184 Type: `string` 185 Default: `""` 186 187 ### `tls.client_certs[].key` 188 189 A plain text certificate key to use. 190 191 192 Type: `string` 193 Default: `""` 194 195 ### `tls.client_certs[].cert_file` 196 197 The path to a certificate to use. 198 199 200 Type: `string` 201 Default: `""` 202 203 ### `tls.client_certs[].key_file` 204 205 The path of a certificate key to use. 206 207 208 Type: `string` 209 Default: `""` 210 211 ### `username` 212 213 A username (when applicable). 214 215 216 Type: `string` 217 Default: `""` 218 219 ### `password` 220 221 A password (when applicable). 222 223 224 Type: `string` 225 Default: `""` 226 227 ### `include` 228 229 Optional additional metrics to collect, enabling these metrics may have some performance implications as it acquires a global semaphore and does `stoptheworld()`. 230 231 232 Type: `object` 233 234 ### `include.runtime` 235 236 A duration string indicating how often to poll and collect runtime metrics. Leave empty to disable this metric 237 238 239 Type: `string` 240 Default: `""` 241 242 ```yaml 243 # Examples 244 245 runtime: 1m 246 ``` 247 248 ### `include.debug_gc` 249 250 A duration string indicating how often to poll and collect GC metrics. Leave empty to disable this metric. 251 252 253 Type: `string` 254 Default: `""` 255 256 ```yaml 257 # Examples 258 259 debug_gc: 1m 260 ``` 261 262 ### `interval` 263 264 A duration string indicating how often metrics should be flushed. 265 266 267 Type: `string` 268 Default: `"1m"` 269 270 ### `ping_interval` 271 272 A duration string indicating how often to ping the host. 273 274 275 Type: `string` 276 Default: `"20s"` 277 278 ### `precision` 279 280 [ns|us|ms|s] timestamp precision passed to write api. 281 282 283 Type: `string` 284 Default: `"s"` 285 286 ### `timeout` 287 288 How long to wait for response for both ping and writing metrics. 289 290 291 Type: `string` 292 Default: `"5s"` 293 294 ### `tags` 295 296 Global tags added to each metric. 297 298 299 Type: `object` 300 Default: `{}` 301 302 ```yaml 303 # Examples 304 305 tags: 306 hostname: localhost 307 zone: danger 308 ``` 309 310 ### `retention_policy` 311 312 Sets the retention policy for each write. 313 314 315 Type: `string` 316 Default: `""` 317 318 ### `write_consistency` 319 320 [any|one|quorum|all] sets write consistency when available. 321 322 323 Type: `string` 324 Default: `""` 325 326 ### `path_mapping` 327 328 An optional [Bloblang mapping](/docs/guides/bloblang/about) that allows you to rename or prevent certain metrics paths from being exported. When metric paths are created, renamed and dropped a trace log is written, enabling TRACE level logging is therefore a good way to diagnose path mappings. BETA FEATURE: Labels can also be created for the metric path by mapping meta fields. 329 330 331 Type: `string` 332 Default: `""` 333 334 ```yaml 335 # Examples 336 337 path_mapping: this.replace("input", "source").replace("output", "sink") 338 339 path_mapping: |- 340 if ![ 341 "benthos.input.received", 342 "benthos.input.latency", 343 "benthos.output.sent" 344 ].contains(this) { deleted() } 345 346 path_mapping: |- 347 let matches = this.re_find_all_submatch("resource_processor_([a-zA-Z]+)_(.*)") 348 meta processor = $matches.0.1 | deleted() 349 root = $matches.0.2 | deleted() 350 ``` 351 352