public String getClusterNodeName() {
    if (clusterName.equalsIgnoreCase("localhost"))
      return getLocalNodeName();
    try {
      return InetAddress.getByName(clusterName).getCanonicalHostName();
    } catch (Exception e) {
      if (DEBUG)
        logger.info("Error during getClusterNodeName: " + e.toString());
    }

    return clusterName;
  }
This class stores published metrics to the SQL Server database.
contrib/ambari-scom/metrics-sink/src/main/java/org/apache/hadoop/metrics2/sink/SqlSink.java