From 51b6b3cbe796f78d256de353c88d4a17e4b73fae Mon Sep 17 00:00:00 2001 From: Anika Kumar Date: Mon, 4 Nov 2024 14:50:47 -0800 Subject: [PATCH] update expression --- .../indexer_autoscaler_lambda/concurrency_scaler.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/elasticgraph-indexer_autoscaler_lambda/lib/elastic_graph/indexer_autoscaler_lambda/concurrency_scaler.rb b/elasticgraph-indexer_autoscaler_lambda/lib/elastic_graph/indexer_autoscaler_lambda/concurrency_scaler.rb index f1c3c9d7..f7f25010 100644 --- a/elasticgraph-indexer_autoscaler_lambda/lib/elastic_graph/indexer_autoscaler_lambda/concurrency_scaler.rb +++ b/elasticgraph-indexer_autoscaler_lambda/lib/elastic_graph/indexer_autoscaler_lambda/concurrency_scaler.rb @@ -50,7 +50,7 @@ def tune_indexer_concurrency(queue_urls:, min_cpu_target:, max_cpu_target:, maxi nil elsif free_storage < minimum_free_storage details_logger.log_pause(free_storage) - 0 + MINIMUM_CONCURRENCY elsif cpu_utilization < min_cpu_target increase_factor = (cpu_midpoint / cpu_utilization).clamp(0.0, 1.5) (current_concurrency * increase_factor).round.tap do |new_concurrency| @@ -81,7 +81,7 @@ def tune_indexer_concurrency(queue_urls:, min_cpu_target:, max_cpu_target:, maxi end else details_logger.log_reset - 0 + MINIMUM_CONCURRENCY end if new_target_concurrency && new_target_concurrency != current_concurrency @@ -110,7 +110,7 @@ def get_min_free_storage metric_data_queries: [ { id: "minFreeStorageAcrossNodes", - expression: "SEARCH({AWS/ES,DomainName,NodeId} MetricName=\"FreeStorageSpace\", \"Minimum\", 30)", + expression: "SEARCH('{AWS/ES,ClientId,DomainName,NodeId} MetricName=\"FreeStorageSpace\"', 'Minimum', 30)", return_data: true } ]