diff --git a/flint-core/src/main/java/org/opensearch/flint/core/metrics/reporter/DimensionedCloudWatchReporter.java b/flint-core/src/main/java/org/opensearch/flint/core/metrics/reporter/DimensionedCloudWatchReporter.java index 3d1876448..8d2257e28 100644 --- a/flint-core/src/main/java/org/opensearch/flint/core/metrics/reporter/DimensionedCloudWatchReporter.java +++ b/flint-core/src/main/java/org/opensearch/flint/core/metrics/reporter/DimensionedCloudWatchReporter.java @@ -372,7 +372,10 @@ public MetricInfo getMetricInfo(DimensionedName dimensionedName) { Set dimensions = new HashSet<>(); if (doesNameConsistsOfMetricNameSpace(parts)) { metricName = Stream.of(parts).skip(2).collect(Collectors.joining(".")); - addInstanceRoleDimension(dimensions, parts); + // Exclude instance role for OpenSearch metrics + if (!parts[3].equals("opensearch")) { + addInstanceRoleDimension(dimensions, parts); + } } addDefaultDimensionsForSparkJobMetrics(dimensions); dimensions.addAll(dimensionedName.getDimensions());