public SortedMap<String, SortedMap<String,String>> getMetadataAgentConfigs() {
    SortedMap<String, SortedMap<String,String>> agentConfigs = new TreeMap<>();
    Map<String, Map<String,String>> agentConfigsMap = configs.getAgentConfigsMap();

    for (String key : agentConfigsMap.keySet()) {
      agentConfigs.put(key, new TreeMap<>(agentConfigsMap.get(key)));
    }

    return agentConfigs;
  }
Collects full metadata info about clusters for agent.
@return metadata info about clusters
@throws AmbariException
ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariManagementControllerImpl.java