private String hostName(String resolvedHost) throws AmbariException {
    return hasScheme(resolvedHost)
      ? URI.create(resolvedHost).getHost()
      : URI.create("any://" + resolvedHost).getHost();
  }
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