public Map<Long, Map<Long, AlertDefinition>> getAlertDefinitions(Long hostId) throws AmbariException {
    Map<Long, Map<Long, AlertDefinition>> result = new HashMap<>();
    String hostName = m_clusters.get().getHostById(hostId).getHostName();
    for (Cluster cluster : m_clusters.get().getClustersForHost(hostName)) {
      List<AlertDefinition> alertDefinitions = getAlertDefinitions(cluster.getClusterName(), hostName);
      result.put(cluster.getClusterId(), mapById(alertDefinitions));
    }
    return result;
  }
Gets the alert definitions for the specified host. This will include the
following types of alert definitions:
<ul>
<li>Service/Component alerts</li>
<li>Service alerts where the host is a MASTER</li>
<li>Host alerts that are not bound to a service</li>
</ul>

@param clusterName
         the cluster name (not {@code null}).
@param hostName
         the host name (not {@code null}).
@return the alert definitions for the host, or an empty set (never
        {@code null}).
ambari-server/src/main/java/org/apache/ambari/server/state/alert/AlertDefinitionHash.java