Skip to content

Commit

Permalink
customizing index settings work in progress, idaholab#313
Browse files Browse the repository at this point in the history
mmguero committed Jan 15, 2024
1 parent bc2d490 commit 4e39e89
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Dockerfiles/dashboards-helper.Dockerfile
Original file line number Diff line number Diff line change
@@ -95,7 +95,7 @@ RUN apk update --no-cache && \
/opt/templates && \
chmod 755 /data/*.sh /data/*.py /data/init && \
chmod 400 /opt/maps/* && \
(echo -e "*/2 * * * * /data/create-arkime-sessions-index.sh\n0 10 * * * /data/index-refresh.py --template malcolm_template --unassigned\n30 */2 * * * /data/index-refresh.py --index 'malcolm_beats_*' --template malcolm_beats_template --unassigned\n*/20 * * * * /data/opensearch_index_size_prune.py" > ${SUPERCRONIC_CRONTAB})
(echo -e "*/2 * * * * /data/create-arkime-sessions-index.sh\n0 10 * * * /data/index-refresh.py --index MALCOLM_NETWORK_INDEX_PATTERN --template malcolm_template --unassigned\n30 */2 * * * /data/index-refresh.py --index MALCOLM_OTHER_INDEX_PATTERN --template malcolm_beats_template --unassigned\n*/20 * * * * /data/opensearch_index_size_prune.py" > ${SUPERCRONIC_CRONTAB})
EXPOSE $OFFLINE_REGION_MAPS_PORT
4 changes: 4 additions & 0 deletions dashboards/scripts/index-refresh.py
Original file line number Diff line number Diff line change
@@ -191,6 +191,10 @@ def main():
if debug:
eprint('OpenSearch version is {}'.format(opensearchVersion))

# if they actually just specified the name of the environment variable, resolve that for the index name
if args.index.startswith('MALCOLM_'):
args.index = os.getenv(args.index, '')

# find the ID of the index name (probably will be the same as the name)
getIndexInfoResponse = requests.get(
'{}/{}'.format(args.dashboardsUrl, GET_INDEX_PATTERN_INFO_URI),

0 comments on commit 4e39e89

Please sign in to comment.