Skip to content

Commit

Permalink
customizing index settings work in progress, idaholab#313
Browse files Browse the repository at this point in the history
  • Loading branch information
mmguero committed Jan 16, 2024
1 parent 7d87f2a commit b002f2f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion scripts/install.py
Original file line number Diff line number Diff line change
Expand Up @@ -1038,7 +1038,7 @@ def tweak_malcolm_runtime(self, malcolm_install_path):
'Enter index threshold (e.g., 250GB, 1TB, 60%, etc.)', default=args.indexPruneSizeLimit
)
indexPruneNameSort = InstallerYesOrNo(
'Determine oldest indices by name (instead of creation time)?', default=True
'Determine oldest indices by name (instead of creation time)?', default=False
)

# let Arkime delete old PCAP files based on available storage
Expand Down
5 changes: 4 additions & 1 deletion shared/bin/opensearch_index_size_prune.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ def main():
default=str2bool(os.getenv('OPENSEARCH_INDEX_SIZE_PRUNE_DEBUG', default='False')),
help="Verbose output",
)
# TODO: allow specifying two indices (e.g., MALCOLM_NETWORK_INDEX_PATTERN may be different than ARKIME_NETWORK_INDEX_PATTERN)
parser.add_argument(
'-i',
'--index',
Expand All @@ -49,6 +48,7 @@ def main():
default=[
os.getenv('MALCOLM_NETWORK_INDEX_PATTERN', 'arkime_sessions3-*'),
os.getenv('ARKIME_NETWORK_INDEX_PATTERN', 'arkime_sessions3-*'),
os.getenv('MALCOLM_OTHER_INDEX_PATTERN', 'malcolm_beats_*'),
],
help='Index pattern(s)',
)
Expand Down Expand Up @@ -280,6 +280,9 @@ def main():
osInfo['_all']['primaries' if args.primaryTotals else 'total']['store']['size_in_bytes'] // 1000000
)
totalIndices = totalIndices + len(osInfo["indices"])
except KeyError:
# just means there aren't any indices of this type yet, ignore it
pass
except Exception as e:
raise Exception(f'Error getting {idx} size_in_bytes: {e}')
if debug:
Expand Down

0 comments on commit b002f2f

Please sign in to comment.