From 62f0715abe995e7ce8de1adbd62b67f7159a9945 Mon Sep 17 00:00:00 2001 From: Quentin Dufour Date: Wed, 6 Apr 2022 14:10:18 +0200 Subject: [PATCH] Add/Fix OpenTelemetry --- script/telemetry/README.md | 21 +++++++++++++++++++ .../provisioning/datasources/elastic.yaml | 7 +++---- script/telemetry/elastic/otel-config.yaml | 2 +- 3 files changed, 25 insertions(+), 5 deletions(-) create mode 100644 script/telemetry/README.md diff --git a/script/telemetry/README.md b/script/telemetry/README.md new file mode 100644 index 00000000..3b403454 --- /dev/null +++ b/script/telemetry/README.md @@ -0,0 +1,21 @@ +Configure your `[admin-api]` endpoint: + +``` +[admin] +api_bind_addr = "0.0.0.0:3903" +trace_sink = "http://localhost:4317" +``` + +Start the test stack: + +``` +cd telemetry +docker-compose up +``` + +Access the web interfaces: + - [Kibana](http://localhost:5601) - Click on the hamburger menu, in the Observability section, click APM + - [Grafana](http://localhost:3000) - Set a password, then on the left menu, click Dashboard -> Browse. On the new page click Import -> Choose the test dashboard we ship `grafana-garage-dashboard-elasticsearch.json` + + + diff --git a/script/telemetry/elastic/grafana/provisioning/datasources/elastic.yaml b/script/telemetry/elastic/grafana/provisioning/datasources/elastic.yaml index e46e7ac9..bcb96b95 100644 --- a/script/telemetry/elastic/grafana/provisioning/datasources/elastic.yaml +++ b/script/telemetry/elastic/grafana/provisioning/datasources/elastic.yaml @@ -4,17 +4,16 @@ datasources: - name: DS_ELASTICSEARCH type: elasticsearch access: proxy - url: http://elastic:9700 + url: http://localhost:9200 password: '' user: '' - database: metricbeat-* + database: apm-* basicAuth: false isDefault: true jsonData: - esVersion: 70 + esVersion: 7.10.0 logLevelField: '' logMessageField: '' maxConcurrentShardRequests: 5 timeField: "@timestamp" - timeInterval: 10s readOnly: false diff --git a/script/telemetry/elastic/otel-config.yaml b/script/telemetry/elastic/otel-config.yaml index cd119f0a..51ff3f5d 100644 --- a/script/telemetry/elastic/otel-config.yaml +++ b/script/telemetry/elastic/otel-config.yaml @@ -13,7 +13,7 @@ receivers: - job_name: "garage" scrape_interval: 5s static_configs: - - targets: ["localhost:3909"] + - targets: ["localhost:3903"] exporters: logging: