@@ -25,24 +25,58 @@ can use [Telegraf].
2525:::{rubric} Synopsis
2626:::
2727
28- Configure OpenTelemetry Collector to send metrics data to the [ CrateDB Prometheus Adapter] .
29-
30- :::{literalinclude} collector/otelcol.yaml
31- :lines: 26-34
32- :::
33- :::{literalinclude} collector/otelcol.yaml
34- :lines: 38-43
35- :::
28+ Configure OpenTelemetry Collector to send metrics data to the
29+ [ CrateDB Prometheus Adapter] by configuring the ` prometheusremotewrite `
30+ exporter endpoint.
31+
32+ ``` yaml
33+ exporters :
34+ prometheusremotewrite :
35+ endpoint : " http://cratedb-prometheus-adapter:9268/write"
36+ remote_write_queue :
37+ enabled : false
38+ external_labels :
39+ subsystem : " otel-testdrive"
40+ debug :
41+ verbosity : detailed
42+ ` ` `
43+ ` ` ` yaml
44+ service :
45+ pipelines :
46+ metrics :
47+ receivers : [otlp, carbon]
48+ processors : [batch]
49+ exporters : [debug, prometheusremotewrite]
50+ ` ` `
3651
3752Configure Telegraf to store OpenTelemetry metrics data into CrateDB.
3853
39- :::{literalinclude} telegraf/telegraf.conf
40- :lines: 1-6
41- :::
42- :::{literalinclude} telegraf/telegraf.conf
43- :lines: 27-33
44- :::
54+ ` ` ` ini
55+ # OpenTelemetry Input Plugin
56+ # https://github.com/influxdata/telegraf/blob/release-1.36/plugins/inputs/opentelemetry/README.md
57+ [[inputs.opentelemetry]]
58+ ```
59+ ``` ini
60+ # CrateDB Output Plugin
61+ # https://github.com/influxdata/telegraf/tree/master/plugins/outputs/cratedb
62+ [[outputs.cratedb] ]
63+
64+ # # Connection parameters for accessing the database.
65+ # # See https://pkg.go.dev/github.com/jackc/pgx/v4#ParseConfig for available options.
66+ url = " postgres://crate:crate@cratedb/doc?sslmode=disable"
67+
68+ # # Timeout for all CrateDB queries.
69+ # timeout = "5s"
4570
71+ # # Name of the table to store metrics in.
72+ table = " metrics"
73+
74+ # # If true, and the metrics table does not exist, create it automatically.
75+ table_create = true
76+
77+ # # The character(s) to replace any '.' in an object key with
78+ # key_separator = "_"
79+ ```
4680
4781:::{rubric} Learn
4882:::
0 commit comments