Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,8 @@ private AlertType(short type, String name, boolean isDefault) {
public static final AlertType ALERT_TYPE_HA_ACTION = new AlertType((short)30, "ALERT.HA.ACTION", true);
public static final AlertType ALERT_TYPE_CA_CERT = new AlertType((short)31, "ALERT.CA.CERT", true);
public static final AlertType ALERT_TYPE_VM_SNAPSHOT = new AlertType((short)32, "ALERT.VM.SNAPSHOT", true);
public static final AlertType ALERT_TYPE_VR_PUBLIC_IFACE_MTU = new AlertType((short)32, "ALERT.VR.PUBLIC.IFACE.MTU", true);
public static final AlertType ALERT_TYPE_VR_PRIVATE_IFACE_MTU = new AlertType((short)32, "ALERT.VR.PRIVATE.IFACE.MTU", true);
public static final AlertType ALERT_TYPE_VR_PUBLIC_IFACE_MTU = new AlertType((short)33, "ALERT.VR.PUBLIC.IFACE.MTU", true);
public static final AlertType ALERT_TYPE_VR_PRIVATE_IFACE_MTU = new AlertType((short)34, "ALERT.VR.PRIVATE.IFACE.MTU", true);

public short getType() {
return type;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,5 +54,4 @@ public interface AlertManager extends Manager, AlertService {
void recalculateCapacity();

void sendAlert(AlertType alertType, long dataCenterId, Long podId, String subject, String body);

}
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,6 @@
--;

ALTER TABLE `cloud`.`template_store_ref` MODIFY COLUMN `download_url` varchar(2048);

UPDATE `cloud`.`alert` SET type = 33 WHERE name = 'ALERT.VR.PUBLIC.IFACE.MTU';
UPDATE `cloud`.`alert` SET type = 34 WHERE name = 'ALERT.VR.PRIVATE.IFACE.MTU';
5 changes: 3 additions & 2 deletions server/src/main/java/com/cloud/event/AlertGenerator.java
Original file line number Diff line number Diff line change
Expand Up @@ -67,12 +67,13 @@ void init() {
}

public static void publishAlertOnEventBus(String alertType, long dataCenterId, Long podId, String subject, String body) {

String configKey = Config.PublishAlertEvent.key();
String value = s_configDao.getValue(configKey);
boolean configValue = Boolean.parseBoolean(value);
if(!configValue)
if (!configValue) {
return;
}

try {
eventDistributor = ComponentContext.getComponent(EventDistributor.class);
} catch (NoSuchBeanDefinitionException nbe) {
Expand Down