@Override
  public MetricsService getMetricsServiceType() {
    try {
      checkInit();
    } catch (SystemException e) {
      LOG.error("Exception during checkInit.", e);
    }

    if (!metricsCollectorHAManager.isEmpty()) {
      return TIMELINE_METRICS;
    } else if (!clusterGangliaCollectorMap.isEmpty()) {
      return GANGLIA;
    }
    return null;
  }
Get type of Metrics system installed.
@return @MetricsService, null if none found.
ambari-server/src/main/java/org/apache/ambari/server/controller/internal/AbstractProviderModule.java