mirror of
https://github.com/elastic/logstash.git
synced 2025-04-24 14:47:19 -04:00
This commit adds a Buildkite pipeline to test against serverless endpoint daily Tests cover - es-output - es-input - es-filter - central pipeline management - legacy monitoring - dlq - integration-filter - kibana API - metricbeat stack monitoring Co-authored-by: João Duarte <jsvd@users.noreply.github.com> Co-authored-by: João Duarte <jsvduarte@gmail.com>
30 lines
No EOL
787 B
Bash
Executable file
30 lines
No EOL
787 B
Bash
Executable file
#!/usr/bin/env bash
|
|
set -ex
|
|
|
|
source ./$(dirname "$0")/common.sh
|
|
|
|
|
|
check_named_index() {
|
|
check_logstash_api '.pipelines.main.plugins.outputs[] | select(.id == "named_index") | .documents.successes' '1'
|
|
}
|
|
|
|
get_data_stream_count() {
|
|
curl -s -u "$ES_USER:$ES_PW" "$ES_ENDPOINT/logs-$INDEX_NAME.001-default/_count" | jq '.count'
|
|
}
|
|
|
|
compare_data_stream_count() {
|
|
[[ $(get_data_stream_count) -ge "$INITIAL_DATA_STREAM_CNT" ]] && echo "0"
|
|
}
|
|
|
|
check_data_stream_output() {
|
|
count_down_check 20 compare_data_stream_count
|
|
}
|
|
|
|
check_plugin() {
|
|
add_check check_named_index "Failed index check."
|
|
add_check check_data_stream_output "Failed data stream check."
|
|
}
|
|
|
|
setup
|
|
export INITIAL_DATA_STREAM_CNT=$(get_data_stream_count)
|
|
run_logstash "$CURRENT_DIR/pipeline/001_es-output.conf" check_plugin |