private String replaceVariables(String clusterName, String hostName) {
    try {
      return hostName(variableReplacer.replaceVariables(hostName, config(clusterName)));
    } catch (AmbariException e) {
      throw new RuntimeException(e);
    }
  }
I'm a special {@link MetricHostProvider} that can override default component host names.
ambari-server/src/main/java/org/apache/ambari/server/controller/internal/OverriddenMetricsHostProvider.java