From cca68b24db63114ce40e4acdf9b5404e110b3293 Mon Sep 17 00:00:00 2001 From: vkalintiris Date: Wed, 15 Mar 2023 08:11:55 +0200 Subject: New build_external scenario. (#14725) --- build_external/scenarios/children-to-localhost/README.md | 10 ++++++++++ .../scenarios/children-to-localhost/child_stream.conf | 10 ++++++++++ .../scenarios/children-to-localhost/docker-compose.yml | 9 +++++++++ .../scenarios/children-to-localhost/parent_stream.conf | 7 +++++++ 4 files changed, 36 insertions(+) create mode 100644 build_external/scenarios/children-to-localhost/README.md create mode 100644 build_external/scenarios/children-to-localhost/child_stream.conf create mode 100644 build_external/scenarios/children-to-localhost/docker-compose.yml create mode 100644 build_external/scenarios/children-to-localhost/parent_stream.conf diff --git a/build_external/scenarios/children-to-localhost/README.md b/build_external/scenarios/children-to-localhost/README.md new file mode 100644 index 0000000000..7b7be665ac --- /dev/null +++ b/build_external/scenarios/children-to-localhost/README.md @@ -0,0 +1,10 @@ +# Stream children to localhost + +1. Run `docker-compose up --scale=50` +2. Copy `parent_stream.conf` to the `stream.conf` of a local agent +3. Restart the local agent + +You'll have 50 child agents streaming to the parent agent that runs locally. + +Useful for easily stress testing, restarting, profiling, debugging, etc, a +locally-built agent during development. diff --git a/build_external/scenarios/children-to-localhost/child_stream.conf b/build_external/scenarios/children-to-localhost/child_stream.conf new file mode 100644 index 0000000000..72a353fe05 --- /dev/null +++ b/build_external/scenarios/children-to-localhost/child_stream.conf @@ -0,0 +1,10 @@ +[stream] + enabled = yes + destination = tcp:host.docker.internal + api key = 00000000-0000-0000-0000-000000000000 + timeout seconds = 60 + default port = 19999 + send charts matching = * + buffer size bytes = 1048576 + reconnect delay seconds = 5 + initial clock resync iterations = 60 diff --git a/build_external/scenarios/children-to-localhost/docker-compose.yml b/build_external/scenarios/children-to-localhost/docker-compose.yml new file mode 100644 index 0000000000..59739f9eba --- /dev/null +++ b/build_external/scenarios/children-to-localhost/docker-compose.yml @@ -0,0 +1,9 @@ +version: '3.3' +services: + child: + image: netdata/netdata + command: /usr/sbin/netdata -D + volumes: + - ./child_stream.conf:/etc/netdata/stream.conf:ro + extra_hosts: + - "host.docker.internal:host-gateway" diff --git a/build_external/scenarios/children-to-localhost/parent_stream.conf b/build_external/scenarios/children-to-localhost/parent_stream.conf new file mode 100644 index 0000000000..bf85ae258a --- /dev/null +++ b/build_external/scenarios/children-to-localhost/parent_stream.conf @@ -0,0 +1,7 @@ +[00000000-0000-0000-0000-000000000000] + enabled = yes + allow from = * + default history = 3600 + health enabled by default = auto + default postpone alarms on connect seconds = 60 + multiple connections = allow -- cgit v1.2.3