private MaintenanceState getMaintenanceState(Alert alert, Long clusterId) {
    MaintenanceState maintenanceState = MaintenanceState.OFF;
    try {
      maintenanceState = m_maintenanceStateHelper.get().getEffectiveState(clusterId, alert);
    } catch (Exception exception) {
      LOG.error("Unable to determine the maintenance mode state for {}, defaulting to OFF",
          alert, exception);
    }
    return maintenanceState;
  }
Adds an alert. Checks for a new state before creating a new history record.

@param event
         the event to handle.
ambari-server/src/main/java/org/apache/ambari/server/events/listeners/alerts/AlertReceivedListener.java