We have developed a custom script based alert for our ambari service which
triggers alert based on some ambari metric value. For fetching this metric
value, the metric collector hostname and port is required. It seems that
clusterHostInfo configuration is not available in alert script, so we
referred to timeline.metrics.service.webapp.address. Everthing works as
expected. But now the issue arises when we configure metric service in HA
mode. For metric service to work in HA mode
timeline.metrics.service.webapp.address cannot be changed to hostname as we
previously did.

So from where can we get active metric collector hostname?