diff options
author | Alex Auvolat <alex@adnab.me> | 2022-02-17 15:06:09 +0100 |
---|---|---|
committer | Alex Auvolat <alex@adnab.me> | 2022-02-17 15:06:09 +0100 |
commit | 65ca536b3b3bf92115d0fd2618555ea056dc6b6f (patch) | |
tree | 6c5804fa5f0685809b0b9d698a1aad53aa5bdd1c /app/telemetry/config | |
parent | 689870ec00147bced3c7105daf617b0fc1e3c5eb (diff) | |
download | nixcfg-65ca536b3b3bf92115d0fd2618555ea056dc6b6f.tar.gz nixcfg-65ca536b3b3bf92115d0fd2618555ea056dc6b6f.zip |
Add telemetry to garage staging
Diffstat (limited to 'app/telemetry/config')
-rw-r--r-- | app/telemetry/config/apm-config.yaml | 10 | ||||
-rw-r--r-- | app/telemetry/config/grafana/provisioning/datasources/elastic.yaml | 21 | ||||
-rw-r--r-- | app/telemetry/config/otel-config.yaml | 50 |
3 files changed, 81 insertions, 0 deletions
diff --git a/app/telemetry/config/apm-config.yaml b/app/telemetry/config/apm-config.yaml new file mode 100644 index 0000000..1c1e645 --- /dev/null +++ b/app/telemetry/config/apm-config.yaml @@ -0,0 +1,10 @@ +apm-server: + # Defines the host and port the server is listening on. Use "unix:/path/to.sock" to listen on a unix domain socket. + host: "0.0.0.0:8200" +#-------------------------- Elasticsearch output -------------------------- +output.elasticsearch: + # Array of hosts to connect to. + # Scheme and port can be left out and will be set to the default (`http` and `9200`). + # In case you specify and additional path, the scheme is required: `http://localhost:9200/path`. + # IPv6 addresses should always be defined as: `https://[2001:db8::1]:9200`. + hosts: ["localhost:9200"] diff --git a/app/telemetry/config/grafana/provisioning/datasources/elastic.yaml b/app/telemetry/config/grafana/provisioning/datasources/elastic.yaml new file mode 100644 index 0000000..8108a53 --- /dev/null +++ b/app/telemetry/config/grafana/provisioning/datasources/elastic.yaml @@ -0,0 +1,21 @@ +apiVersion: 1 + +datasources: + - name: DS_ELASTICSEARCH + type: elasticsearch + access: proxy + url: http://localhost:9200 + password: '' + user: '' + database: apm-* + basicAuth: false + isDefault: true + jsonData: + esVersion: "7.10.0" + includeFrozen: false + logLevelField: '' + logMessageField: '' + maxConcurrentShardRequests: 5 + timeField: "@timestamp" + timeInterval: "5s" + readOnly: false diff --git a/app/telemetry/config/otel-config.yaml b/app/telemetry/config/otel-config.yaml new file mode 100644 index 0000000..6749ee3 --- /dev/null +++ b/app/telemetry/config/otel-config.yaml @@ -0,0 +1,50 @@ +receivers: + # Data sources: metrics, traces + otlp: + protocols: + grpc: + endpoint: ":4317" + http: + endpoint: ":55681" + # Data sources: metrics + prometheus: + config: + scrape_configs: + - job_name: "garage" + scrape_interval: 5s + static_configs: + - targets: + - "10.42.2.21:3909" + - "10.42.2.22:3909" + - "10.42.2.23:3909" + +exporters: + logging: + logLevel: info + # see https://www.elastic.co/guide/en/apm/get-started/current/open-telemetry-elastic.html#open-telemetry-collector + otlp/elastic: + endpoint: "localhost:8200" + tls: + insecure: true + +processors: + batch: + +extensions: + health_check: + pprof: + endpoint: :1888 + zpages: + endpoint: :55679 + +service: + extensions: [pprof, zpages, health_check] + pipelines: + traces: + receivers: [otlp] + processors: [batch] + exporters: [logging, otlp/elastic] + metrics: + receivers: [otlp, prometheus] + processors: [batch] + exporters: [logging, otlp/elastic] |