OpenCTI-Platform / opencti

Open Cyber Threat Intelligence Platform
https://opencti.io
Other
6.45k stars 947 forks source link

ELASTICSEARCH__NUMBER_OF_REPLICAS does not update the opencti-core-settings component template #9093

Open gileri opened 2 days ago

gileri commented 2 days ago

Description

The opencti-core-settings Elasticsearch Component template seems not updated after its first initialization.

Environment

  1. OS (where OpenCTI server runs): Official docker image
  2. OpenCTI version: 6.4.0
  3. OpenCTI client: N/A
  4. Other environment details:

Reproducible Steps

Steps to create the smallest reproducible scenario:

  1. Initialize a new setup of OpenCTI, including Elasticsearch templates and indices
  2. Change the ELASTICSEARCH__NUMBER_OF_REPLICAS environment variable to 0

Expected Output

The opencti-core-settings ES Component template updated to include number_of_replicas: "0". New indices have the set number of replicas (0)

Actual Output

The opencti-core-settings ES Component template is unchanged. New indices have the default number of replicas (1)

Additional information

Edit : Swapped Expected and Actual Output.

Screenshots (optional)

pierremahot commented 2 days ago

May want to update existing indices with the replication parameter potentially for growing clusters or shrinking