@Override
  public Optional<String> getExternalHostName(String clusterName, String componentName) {
    return getOverriddenHost(componentName).map(host -> replaceVariables(clusterName, host));
  }
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