mirror of https://github.com/apache/cloudstack.git
Update alert id for VR public and private interface (#12527)
This commit is contained in:
parent
6932cacabc
commit
ff7ec0cd22
|
|
@ -71,8 +71,8 @@ public interface AlertService {
|
|||
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;
|
||||
|
|
|
|||
|
|
@ -54,5 +54,4 @@ public interface AlertManager extends Manager, AlertService {
|
|||
void recalculateCapacity();
|
||||
|
||||
void sendAlert(AlertType alertType, long dataCenterId, Long podId, String subject, String body);
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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';
|
||||
|
|
|
|||
|
|
@ -67,12 +67,13 @@ public class AlertGenerator {
|
|||
}
|
||||
|
||||
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) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue