@JsonIgnore
  public Map<String, Metric> getMetrics() {
    Map<String, Metric> metricMap = new HashMap<>();
    for (Entry<String, Map<String, Metric>> metricMapEntry : metrics.entrySet()) {
      metricMap.putAll(metricMapEntry.getValue());
    }
    return metricMap;
  }
Return flat metric map without category
ambari-server/src/main/java/org/apache/ambari/server/state/stack/MetricDefinition.java