File tree Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -182,6 +182,22 @@ if sudo test -d /var/log/kolla; then
182182 fi
183183 done
184184
185+ # NOTE: Check if OpenSearch output plugin has connected in OpenSearch scenarios, otherwise
186+ # check_fluentd_missing_logs will fail because fluentd will only parse files when
187+ # output plugin is working.
188+ retries=0
189+ retries_max=10
190+ until [[ $( sudo tail -n 5 /var/log/kolla/fluentd/fluentd.log | grep " Could not communicate to OpenSearch" | wc -l) -eq 0 ]]; do
191+ echo " Found 'Could not communicate to OpenSearch' in last 5 lines of fluentd.log, sleeping 30 seconds"
192+ retries=$(( retries + 1 ))
193+ if [[ $retries != $retries_max ]]; then
194+ sleep 30
195+ else
196+ echo " Found 'Could not communicate to OpenSearch' in last 5 lines of fluentd.log after 10 retries." | tee -a $fluentd_error_summary_file
197+ break
198+ fi
199+ done
200+
185201 if check_fluentd_missing_logs > /dev/null; then
186202 any_critical=1
187203 echo " (critical) Found some missing log files in fluentd logs. Matches in $fluentd_error_summary_file "
You can’t perform that action at this time.
0 commit comments