Skip to content

Commit 5c1353c

Browse files
committed
updates for v26.06.1
1 parent 21e80e0 commit 5c1353c

5 files changed

Lines changed: 32 additions & 11 deletions

File tree

Dockerfiles/dashboards-helper.Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ RUN export BINARCH=$(uname -m | sed 's/x86_64/amd64/' | sed 's/aarch64/arm64/')
125125
/opt/templates && \
126126
chmod 755 /usr/local/bin/*.sh /usr/local/bin/*.py /data/init && \
127127
chmod 400 /opt/maps/* && \
128-
(echo "*/2 * * * * /usr/local/bin/shared-object-creation.sh\n5 * * * * /usr/local/bin/index-refresh.py -vvv --index MALCOLM_NETWORK_INDEX_PATTERN --template malcolm_template --unassigned\n35 * * * * /usr/local/bin/index-refresh.py --index MALCOLM_OTHER_INDEX_PATTERN --template malcolm_beats_template --unassigned\n*/20 * * * * /usr/local/bin/opensearch_index_size_prune.py" > ${SUPERCRONIC_CRONTAB})
128+
(echo "*/2 * * * * /usr/local/bin/shared-object-creation.sh\n5,35 * * * * /usr/local/bin/index-init.sh\n*/20 * * * * /usr/local/bin/opensearch_index_size_prune.py" > ${SUPERCRONIC_CRONTAB})
129129
130130
EXPOSE $OFFLINE_REGION_MAPS_PORT
131131

dashboards/scripts/index-init.sh

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
#!/bin/bash
2+
3+
# Copyright (c) 2026 Battelle Energy Alliance, LLC. All rights reserved.
4+
5+
sleep ${1:-0}
6+
/usr/local/bin/opensearch_status.sh -w
7+
8+
INDEX_PATTERNS=(MALCOLM_NETWORK_INDEX_PATTERN MALCOLM_OTHER_INDEX_PATTERN)
9+
TEMPLATES=(malcolm_template malcolm_beats_template)
10+
11+
for i in "${!INDEX_PATTERNS[@]}"; do
12+
/usr/local/bin/opensearch_status.sh -t "${TEMPLATES[$i]}"
13+
/usr/local/bin/index-refresh.py -vvv \
14+
--dashboards "${DASHBOARDS_URL}" \
15+
--opensearch "${OPENSEARCH_URL}" \
16+
--opensearch-mode "${OPENSEARCH_PRIMARY}" \
17+
--opensearch-curlrc "${OPENSEARCH_CREDS_CONFIG_FILE}" \
18+
--opensearch-ssl-verify "${OPENSEARCH_SSL_CERTIFICATE_VERIFICATION}" \
19+
--index "${INDEX_PATTERNS[$i]}" \
20+
--template "${TEMPLATES[$i]}" \
21+
--unassigned
22+
done

dashboards/scripts/index-refresh.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -511,7 +511,6 @@ def main():
511511
else:
512512
logline = "success (dry run only, no write performed)"
513513
logging.info(logline)
514-
print(logline)
515514

516515
if args.opensearch_mode == DatabaseMode.OpenSearchLocal and args.fix_unassigned and not args.dryrun:
517516
# set some configuration-related indexes' (e.g., opensearch/opendistro) replica count to 0

dashboards/supervisord.conf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ supervisor.rpcinterface_factory=supervisor.rpcinterface:make_main_rpcinterface
1818
serverurl=unix:///tmp/supervisor.sock
1919

2020
[program:idxinit]
21-
command=bash -c "sleep 180 && /usr/local/bin/opensearch_status.sh -w && ( /usr/local/bin/index-refresh.py -vvv --dashboards \"%(ENV_DASHBOARDS_URL)s\" --opensearch \"%(ENV_OPENSEARCH_URL)s\" --opensearch-mode \"%(ENV_OPENSEARCH_PRIMARY)s\" --opensearch-curlrc \"%(ENV_OPENSEARCH_CREDS_CONFIG_FILE)s\" --opensearch-ssl-verify %(ENV_OPENSEARCH_SSL_CERTIFICATE_VERIFICATION)s --index MALCOLM_NETWORK_INDEX_PATTERN --template malcolm_template --unassigned ; /usr/local/bin/index-refresh.py -vvv --dashboards \"%(ENV_DASHBOARDS_URL)s\" --opensearch \"%(ENV_OPENSEARCH_URL)s\" --opensearch-mode \"%(ENV_OPENSEARCH_PRIMARY)s\" --opensearch-curlrc \"%(ENV_OPENSEARCH_CREDS_CONFIG_FILE)s\" --opensearch-ssl-verify %(ENV_OPENSEARCH_SSL_CERTIFICATE_VERIFICATION)s --index MALCOLM_OTHER_INDEX_PATTERN --template malcolm_beats_template --unassigned )"
21+
command=/usr/local/bin/index-init.sh 180
2222
autostart=true
2323
autorestart=false
2424
startsecs=0

shared/bin/opensearch_status.sh

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -84,32 +84,32 @@ until [[ "$(curl "${CURL_CONFIG_PARAMS[@]}" -fsSL "$OPENSEARCH_URL/_cat/health?h
8484
sleep 1
8585
done
8686

87-
echo "$OPENSEARCH_PRIMARY is up and healthy at "$OPENSEARCH_URL"" >&2
87+
echo "$OPENSEARCH_PRIMARY is up and healthy at "$OPENSEARCH_URL""
8888

8989
if [[ -n "$WAIT_FOR_TEMPLATE_LEGACY" ]]; then
9090
sleep 1
91-
echo "Waiting until $OPENSEARCH_PRIMARY has legacy template \"$WAIT_FOR_TEMPLATE_LEGACY\"..." >&2
91+
echo "Waiting until $OPENSEARCH_PRIMARY has legacy template \"$WAIT_FOR_TEMPLATE_LEGACY\"..."
9292
until ( curl "${CURL_CONFIG_PARAMS[@]}" -fs -H'Content-Type: application/json' -XGET "$OPENSEARCH_URL/_template/$WAIT_FOR_TEMPLATE_LEGACY" 2>/dev/null | grep -q mappings ); do
9393
sleep 5
9494
done
95-
echo "$OPENSEARCH_PRIMARY legacy template \"$WAIT_FOR_TEMPLATE_LEGACY\" exists" >&2
95+
echo "$OPENSEARCH_PRIMARY legacy template \"$WAIT_FOR_TEMPLATE_LEGACY\" exists"
9696
sleep 5
9797
fi
9898

9999
if [[ -n "$WAIT_FOR_TEMPLATE" ]]; then
100100
sleep 1
101-
echo "Waiting until $OPENSEARCH_PRIMARY has index template \"$WAIT_FOR_TEMPLATE\"..." >&2
101+
echo "Waiting until $OPENSEARCH_PRIMARY has index template \"$WAIT_FOR_TEMPLATE\"..."
102102
until ( curl "${CURL_CONFIG_PARAMS[@]}" -fs -H'Content-Type: application/json' -XGET "$OPENSEARCH_URL/_index_template/$WAIT_FOR_TEMPLATE" 2>/dev/null | grep -q index_templates ); do
103103
sleep 5
104104
done
105-
echo "$OPENSEARCH_PRIMARY index template \"$WAIT_FOR_TEMPLATE\" exists" >&2
105+
echo "$OPENSEARCH_PRIMARY index template \"$WAIT_FOR_TEMPLATE\" exists"
106106
sleep 5
107107
fi
108108

109109
if (( $WAIT_FOR_LOG_DATA == 1 )); then
110110
sleep 1
111111

112-
echo "Waiting until $OPENSEARCH_PRIMARY has logs..." >&2
112+
echo "Waiting until $OPENSEARCH_PRIMARY has logs..."
113113

114114
# wait until at least one network traffic log index exists (get index count where docs.count > 0)
115115
FOUND_INDEX=
@@ -130,5 +130,5 @@ if (( $WAIT_FOR_LOG_DATA == 1 )); then
130130
fi
131131
[[ -n "$FOUND_INDEX" ]] && break || sleep 5
132132
done
133-
echo "Logs exist." >&2
134-
fi
133+
echo "Logs exist."
134+
fi

0 commit comments

Comments
 (0)