Skip to content

Commit

Permalink
replace opensearch with clickhouse
Browse files Browse the repository at this point in the history
  • Loading branch information
austinlparker committed Oct 24, 2023
1 parent d244bde commit cd89fc4
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 54 deletions.
37 changes: 8 additions & 29 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -636,7 +636,7 @@ services:
limits:
memory: 100M
environment:
- "GF_INSTALL_PLUGINS=grafana-opensearch-datasource"
- "GF_INSTALL_PLUGINS=grafana-clickhouse-datasource"
volumes:
- ./src/grafana/grafana.ini:/etc/grafana/grafana.ini
- ./src/grafana/provisioning/:/etc/grafana/provisioning/
Expand Down Expand Up @@ -690,35 +690,14 @@ services:
- "${PROMETHEUS_SERVICE_PORT}:${PROMETHEUS_SERVICE_PORT}"
logging: *logging

opensearch:
image: opensearchproject/opensearch:latest
container_name: opensearch
environment:
- cluster.name=demo-cluster
- node.name=demo-node
- bootstrap.memory_lock=true
- discovery.type=single-node
- "OPENSEARCH_JAVA_OPTS=-Xms512m -Xmx512m"
- "DISABLE_INSTALL_DEMO_CONFIG=true"
- "DISABLE_SECURITY_PLUGIN=true"
ulimits:
memlock:
soft: -1
hard: -1
nofile:
soft: 65536
hard: 65536
ports:
- "9200:9200"
logging: *logging

dataprepper:
image: opensearchproject/data-prepper:latest
volumes:
- ./src/opensearch/pipelines.yaml:/usr/share/data-prepper/pipelines/pipelines.yaml
- ./src/opensearch/data-prepper-config.yaml:/usr/share/data-prepper/config/data-prepper-config.yaml
clickhouse:
image: clickhouse/clickhouse-server
user: "101:101"
container_name: clickhouse
hostname: clickhouse
ports:
- "21892"
- "8123"
- "9000"
logging: *logging

# *****
Expand Down
14 changes: 14 additions & 0 deletions src/grafana/provisioning/datasources/clickhouse.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Copyright The OpenTelemetry Authors
# SPDX-License-Identifier: Apache-2.0

apiVersion: 1

datasources:
- name: ClickHouse
type: grafana-clickhouse-datasource
jsonData:
defaultDatabase: otel
port: 9000
server: clickhouse
username: default
tlsSkipVerify: true
20 changes: 0 additions & 20 deletions src/grafana/provisioning/datasources/opensearch.yaml

This file was deleted.

19 changes: 14 additions & 5 deletions src/otelcollector/otelcol-config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,23 @@ exporters:
endpoint: "jaeger:4317"
tls:
insecure: true
otlp/logs:
endpoint: "dataprepper:21892"
tls:
insecure: true
otlphttp/prometheus:
endpoint: "http://prometheus:9090/api/v1/otlp"
tls:
insecure: true
clickhouse:
endpoint: tcp://clickhouse:9000?dial_timeout=10s&compress=lz4
database: otel
ttl_days: 3
logs_table_name: otel_logs
traces_table_name: otel_traces
metrics_table_name: otel_metrics
timeout: 5s
retry_on_failure:
enabled: true
initial_interval: 5s
max_interval: 30s
max_elapsed_time: 300s

processors:
batch:
Expand Down Expand Up @@ -64,4 +73,4 @@ service:
logs:
receivers: [otlp]
processors: [batch]
exporters: [otlp/logs, debug]
exporters: [clickhouse, debug]

0 comments on commit cd89fc4

Please sign in to comment.