From 8c9b3be84b9f4a0ee14677c2cb957d5c1386d221 Mon Sep 17 00:00:00 2001 From: Ning Sun Date: Tue, 17 Dec 2024 22:05:08 +0800 Subject: [PATCH] feat: init commit of datadog migration demo --- datadog-agent-migration/docker-compose.yml | 54 ++++++++++++++++++++++ datadog-agent-migration/vector.toml | 13 ++++++ 2 files changed, 67 insertions(+) create mode 100644 datadog-agent-migration/docker-compose.yml create mode 100644 datadog-agent-migration/vector.toml diff --git a/datadog-agent-migration/docker-compose.yml b/datadog-agent-migration/docker-compose.yml new file mode 100644 index 0000000..d26d858 --- /dev/null +++ b/datadog-agent-migration/docker-compose.yml @@ -0,0 +1,54 @@ +services: + envsubst: + image: docker.io/widerplan/envsubst + command: "-i /config_input/vector.toml -o /config_output/vector.toml" + volumes: + - ./vector.toml:/config_input/vector.toml + - config:/config_output + env_file: + - path: "greptime.env" + required: false + init: true + + greptimedb: + image: docker.io/greptime/greptimedb:v0.11.0 + command: standalone start --http-addr=0.0.0.0:4000 --rpc-addr=0.0.0.0:4001 --mysql-addr=0.0.0.0:4002 --postgres-addr 0.0.0.0:4003 + ports: + - 24000:4000 + - 24001:4001 + - 24002:4002 + - 24003:4003 + networks: + - demo-network + healthcheck: + test: [ "CMD", "curl", "-f", "http://127.0.0.1:4000/health" ] + interval: 3s + timeout: 3s + retries: 5 + + datadog_agent: + image: docker.io/datadog/agent:7 + networks: + - demo-network + environment: + - DD_API_KEY=random_string + - DD_DD_URL=http://vector:8000 + - DD_HOSTNAME=testagent + + vector: + image: docker.io/timberio/vector:0.43.X-alpine + networks: + - demo-network + volumes: + - config:/config_data + command: "-c /config_data/vector.toml" + depends_on: + envsubst: + condition: service_completed_successfully + + +networks: + demo-network: + +volumes: + config: diff --git a/datadog-agent-migration/vector.toml b/datadog-agent-migration/vector.toml new file mode 100644 index 0000000..d4e83f2 --- /dev/null +++ b/datadog-agent-migration/vector.toml @@ -0,0 +1,13 @@ +[sources.datadog] +type = "datadog_agent" +address = "0.0.0.0:8000" + +[sinks.my_greptimedb] +inputs = ["datadog"] +type = "greptimedb_metrics" +endpoint = "greptimedb:4001" +dbname = "public" +username = "" +password = "" +new_naming=true +#tls = {}