diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-05 12:08:03 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-05 12:08:18 +0000 |
commit | 5da14042f70711ea5cf66e034699730335462f66 (patch) | |
tree | 0f6354ccac934ed87a2d555f45be4c831cf92f4a /src/fluent-bit/examples/tracing/enable-tracing.sh | |
parent | Releasing debian version 1.44.3-2. (diff) | |
download | netdata-5da14042f70711ea5cf66e034699730335462f66.tar.xz netdata-5da14042f70711ea5cf66e034699730335462f66.zip |
Merging upstream version 1.45.3+dfsg.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/fluent-bit/examples/tracing/enable-tracing.sh')
-rwxr-xr-x | src/fluent-bit/examples/tracing/enable-tracing.sh | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/src/fluent-bit/examples/tracing/enable-tracing.sh b/src/fluent-bit/examples/tracing/enable-tracing.sh new file mode 100755 index 000000000..5bff2b90f --- /dev/null +++ b/src/fluent-bit/examples/tracing/enable-tracing.sh @@ -0,0 +1,21 @@ +#!/bin/bash +set -eu + +REMOTE_HOST=${REMOTE_HOST:-127.0.0.1} + +if command -v http &> /dev/null ; then + http -v "$REMOTE_HOST":2020/api/v1/trace/dummy.0 output=stdout prefix=trace. params:='{"format":"json"}' +elif command -v curl &> /dev/null ; then + curl --header 'Content-Type: application/json' --data '{"output": "stdout", "params": { "format": "json" }, "prefix": "trace."}' "$REMOTE_HOST":2020/api/v1/trace/dummy.0 +else + echo "No curl or httpie installed" + if command -v apt-get &> /dev/null ; then + apt-get -qq update + apt-get -qq install -y curl + elif command -v yum &> /dev/null ; then + yum install -y curl + else + exit 1 + fi + curl --header 'Content-Type: application/json' --data '{"output": "stdout", "params": { "format": "json" }, "prefix": "trace."}' "$REMOTE_HOST":2020/api/v1/trace/dummy.0 +fi |