Skip to content

Commit e2957cf

Browse files
authored
Merge pull request #142 from rancher/stac-0-fix-script
STAC-0: Fix support script
2 parents c3192fd + 9e78ed3 commit e2957cf

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

docs/latest/modules/en/attachments/suse-observability_logs_collector.sh

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ EOF
2525
exit 0;;
2626
e) # Collect elasticsearch logs
2727
ELASTICSEARCH_LOGS=true;;
28-
ELASTICSEARCH_LOGS=true;;
2928
r) # Time range for elasticsearch logs
3029
ELASTICSEARCH_RANGE=$OPTARG;;
3130
\?) # Invalid option
@@ -271,7 +270,7 @@ EOF
271270
}
272271
EOF
273272
ts=$(jq -r '.hits.hits[-1].sort[0]' $TEMP)
274-
if [ "$ts" != "null" ]; then
273+
if [ "$ts" != "null" ] && [ "$ts" != "" ]; then
275274
from=$(($ts / 1000000))
276275
else
277276
from=""
@@ -390,7 +389,6 @@ collect_workload_observer_data
390389
if $HELM_RELEASES; then
391390
collect_helm_releases
392391
fi
393-
if $ELASTICSEARCH_LOGS; then
394392
if $ELASTICSEARCH_LOGS; then
395393
collect_pod_logs_from_elasticsearch
396394
fi

0 commit comments

Comments
 (0)