You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[exporter/clickhouse] TLS config / Certificate based Authentication (#42581)
#### Description
Enables usage of OpenTelemetry's TLS configuration structure for
clickhouse-go driver.
Example:
```yaml
exporters:
clickhouse:
endpoint: tcp://127.0.0.1:9000
tls:
insecure: false
insecure_skip_verify: false
ca_file: CAroot.crt
cert_file: client.crt
key_file: client.key
```
#### Link to tracking issue
Fixes#22805, #41116
#### Testing
Added integration test that uses locally generated test certificates to
test certificate authentication with ClickHouse.
Certificates can be regenerated with `./testdata/certs/gen-certs.sh`.
Also updated ClickHouse image versions to latest stable/LTS.
#### Documentation
Updated README with `tls` config description and example.
Copy file name to clipboardExpand all lines: exporter/clickhouseexporter/README.md
+18-2Lines changed: 18 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -290,6 +290,7 @@ Connection options:
290
290
-`create_schema` (default = true): When set to true, will run DDL to create the database and tables. (See [schema management](#schema-management))
291
291
-`compress` (default = lz4): Controls the compression algorithm. Valid options: `none` (disabled), `zstd`, `lz4` (default), `gzip`, `deflate`, `br`, `true` (lz4). Ignored if `compress` is set in the `endpoint` or `connection_params`.
292
292
-`async_insert` (default = true): Enables [async inserts](https://clickhouse.com/docs/en/optimize/asynchronous-inserts). Ignored if async inserts are configured in the `endpoint` or `connection_params`. Async inserts may still be overridden server-side.
293
+
-`tls` Advanced TLS configuration (See [TLS](#tls)).
293
294
294
295
Additional DSN features:
295
296
@@ -342,8 +343,23 @@ Processing:
342
343
343
344
## TLS
344
345
345
-
The exporter supports TLS. To enable TLS, you need to specify the `secure=true` query parameter in the `endpoint` URL or
346
-
use the `https` scheme.
346
+
The exporter supports TLS. To enable TLS, you must specify the `secure=true` query parameter in the `endpoint` URL or use the `https` scheme.
347
+
348
+
You may also use certificate authentication with the `tls` setting:
349
+
350
+
```yaml
351
+
exporters:
352
+
clickhouse:
353
+
endpoint: . . .
354
+
tls:
355
+
insecure: false
356
+
insecure_skip_verify: false
357
+
ca_file: CAroot.crt
358
+
cert_file: client.crt
359
+
key_file: client.key
360
+
```
361
+
362
+
The available `tls` options are inherited from [OpenTelemetry's TLS config structure](https://pkg.go.dev/go.opentelemetry.io/collector/config/configtls#ClientConfig), more options are available than shown in this example.
0 commit comments