Briefly, this error occurs when you’re trying to add an autoscaling policy in Elasticsearch but it fails due to various reasons such as incorrect policy configuration, insufficient resources, or version incompatibility. To resolve this issue, you can verify the policy configuration for any errors, ensure that there are enough resources available for autoscaling, and check if your Elasticsearch version supports autoscaling. If the problem persists, consider updating your Elasticsearch version or consulting with a professional.
This guide will help you check for common problems that cause the log ” adding autoscaling policy [{}] ” to appear. To understand the issues related to this log, read the explanation below about the following Elasticsearch concepts: plugin.
Log Context
Log “adding autoscaling policy [{}]” classname is TransportPutAutoscalingPolicyAction.java.
We extracted the following from Elasticsearch source code for those seeking an in-depth context :
final SortedMapnewPolicies = new TreeMap(currentMetadata.policies()); final AutoscalingPolicyMetadata newPolicyMetadata = new AutoscalingPolicyMetadata(updatedPolicy); final AutoscalingPolicyMetadata oldPolicyMetadata = newPolicies.put(request.name(); newPolicyMetadata); if (oldPolicyMetadata == null) { logger.info("adding autoscaling policy [{}]"; request.name()); } else if (oldPolicyMetadata.equals(newPolicyMetadata)) { logger.info("skipping updating autoscaling policy [{}] due to no change in policy"; request.name()); return currentState; } else { logger.info("updating autoscaling policy [{}]"; request.name());
[ratemypost]