diff --git a/reporting/opensearch.sh b/reporting/opensearch.sh index c8a91367fe43dbb37e589ba9105f623afedbc61d..1bc70f00464edc10437c9bce7d748f05b80f68e3 100755 --- a/reporting/opensearch.sh +++ b/reporting/opensearch.sh @@ -32,6 +32,9 @@ host="${OPENSEARCH_URL:-https://s63.dl.hpc.tuwien.ac.at:9200}" index_pattern="${OPENSEARCH_INDEX_PATTERN:-logstash-tudata-main-*}" log_name="${OPENSEARCH_LOG_NAME:-nginx.main}" +# test the waters, to see if the requests work (especially regarding authentication) +curl -s -f -u "${username}:${password}" "${host}/_cat" > /dev/null + # as long as there's still hits, keep querying... while [[ "${continue}" -gt 0 ]]; do # update the query to incorporate the latest 'sort' value (will be 0 the first time around)