System indices created by the Security Analytics plugin have had hardcoded 'index.auto_expand_replicas' values (such as '0-20' or '0-all'). In large production clusters, this causes indices to replicate across many or all nodes, consuming excessive cluster resources (disk space and JVM heap), while overriding matching index templates configured by administrators.
This commit replaces the hardcoded replica settings with three new dynamic cluster settings:
- plugins.security_analytics.auto_expand_system_index_replicas (defaults to true)
- plugins.security_analytics.min_system_index_replicas (defaults to 0)
- plugins.security_analytics.max_system_index_replicas (defaults to 20)
By setting auto_expand_system_index_replicas to false, administrators can disable programmatic auto-expansion on index creation and allow custom index templates (such as those overriding number_of_replicas or auto_expand_replicas) to be fully respected.
Signed-off-by: theundefined <undefine@aramin.net>
Description
This PR makes the replica configuration of system indices created by the Security Analytics plugin configurable.
System indices created by the Security Analytics plugin have had hardcoded 'index.auto_expand_replicas' values (such as '0-20' or '0-all'). In large production clusters, this causes indices to replicate across many or all nodes, consuming excessive cluster resources (disk space and JVM heap), while overriding matching index templates configured by administrators.
This commit replaces the hardcoded replica settings with three new dynamic cluster settings:
plugins.security_analytics.auto_expand_system_index_replicas(defaults to true)plugins.security_analytics.min_system_index_replicas(defaults to 0)plugins.security_analytics.max_system_index_replicas(defaults to 20)By setting
auto_expand_system_index_replicasto false, administrators can disable programmatic auto-expansion on index creation and allow custom index templates (such as those overridingnumber_of_replicasorauto_expand_replicas) to be fully respected.Related Issues
Resolves # [Issue number to be closed when this PR is merged]
Check List
--signoff.By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.