File tree Expand file tree Collapse file tree 1 file changed +16
-0
lines changed
.buildkite/scripts/benchmark Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -131,6 +131,8 @@ start_logstash() {
131131 cp $CONFIG_PATH /logstash.yml $LS_CONFIG_PATH /logstash.yml
132132 cp $CONFIG_PATH /uuid $LS_CONFIG_PATH /uuid
133133
134+ remove_v9_config
135+
134136 LS_JAVA_OPTS=${LS_JAVA_OPTS:- -Xmx${XMX} g}
135137 docker run -d --name=ls --net=host --cpus=$CPU --memory=${MEM} g -e LS_JAVA_OPTS=" $LS_JAVA_OPTS " \
136138 -e QTYPE=" $QTYPE " -e WORKER=" $WORKER " -e BATCH_SIZE=" $BATCH_SIZE " \
@@ -142,6 +144,20 @@ start_logstash() {
142144 docker.elastic.co/logstash/logstash:$LS_VERSION
143145}
144146
147+ remove_v9_config () {
148+ local config_path=" $LS_CONFIG_PATH /logstash.yml"
149+ local major_version=$( echo $LS_VERSION | cut -d. -f1)
150+ if [ " $major_version " -lt 9 ]; then
151+ echo " Remove v9 config 'xpack.monitoring.allow_legacy_collection' from logstash.yml"
152+
153+ if [[ " $( uname) " == " Darwin" ]]; then
154+ sed -i ' ' ' /xpack\.monitoring\.allow_legacy_collection/d' " $config_path "
155+ else
156+ sed -i ' /xpack\.monitoring\.allow_legacy_collection/d' " $config_path "
157+ fi
158+ fi
159+ }
160+
145161start_filebeat () {
146162 for (( i = 0 ; i < FB_CNT; i++ )) ; do
147163 FB_PATH=" $SCRIPT_PATH /fb${i} "
You can’t perform that action at this time.
0 commit comments