Skip to content

Commit

Permalink
setPrimary for different alert_type
Browse files Browse the repository at this point in the history
  • Loading branch information
qianheng-aws committed Aug 2, 2024
1 parent 2760d2e commit e57da52
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main/java/org/opensearch/agent/tools/RCATool.java
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ private String invokeAPI(String url, Map<String, String> parameters) {
case "_cluster/allocation/explain":
ClusterAllocationExplainRequest request = new ClusterAllocationExplainRequest();
request.setIndex(parameters.get("index"));
request.setPrimary(true);
request.setPrimary(parameters.getOrDefault("alert_type", "").equals("CLUSTER_RED"));
request.setShard(0);
try {
// TODO: need to be optimized to use listener to avoid block wait
Expand Down

0 comments on commit e57da52

Please sign in to comment.