Purpose of the feature

In the current CS code alerts are being published by:

  1. CloudStack orchestration layer
  2. CloudStack plugins (hypervisor and networking)
  3. CloudStack services (Usage service)

The alert is generated by calling the method sendAlert in the AlertManager directly. So it suffices only scenarios when plugin/service is placed on the same server where the MS runs to be able to use cloud-engine* jar. We can assume that 1) and 2) would always get deployed this way, but we can't expect services to run on the same host as MS. So the feature would enable alert publishing for:

Java changes

boolean generateAlert(AlertType alertType, long dataCenterId, Long podId, String msg);

Web API changes

ApiName

Description

 

Request parameters


 

Response parameters


 

Available to regular user


generateAlert

Generates and publishes an alert

  • type (required, type=Short)- alert type 
  • name (required, type=String) - alert name
  • description (required, type=String) - alert description
  • podId (optional, type=UUID) - podId for which alert is being generated
  • zoneId (optional, type=UUID) - zoneId for which alert is being generated

true/false

No