Skip to content

Commit 9cb055c

Browse files
committed
Make the alert non trivial
1 parent 60ec8d3 commit 9cb055c

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

server/src/main/java/com/cloud/alert/AlertManagerImpl.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,8 @@ public class AlertManagerImpl extends ManagerBase implements AlertManager, Confi
112112
, AlertType.ALERT_TYPE_OOBM_AUTH_ERROR
113113
, AlertType.ALERT_TYPE_HA_ACTION
114114
, AlertType.ALERT_TYPE_CA_CERT
115-
, AlertType.ALERT_TYPE_EXTENSION_PATH_NOT_READY);
115+
, AlertType.ALERT_TYPE_EXTENSION_PATH_NOT_READY
116+
, AlertType.ALERT_TYPE_VPN_GATEWAY_OBSOLETE_PARAMETERS);
116117

117118
private static final long INITIAL_CAPACITY_CHECK_DELAY = 30L * 1000L; // Thirty seconds expressed in milliseconds.
118119

server/src/main/java/com/cloud/network/vpn/Site2SiteVpnManagerImpl.java

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ public class Site2SiteVpnManagerImpl extends ManagerBase implements Site2SiteVpn
143143
true, ConfigKey.Scope.Domain);
144144
public static final ConfigKey<Long> VpnCustomerGatewayObsoleteCheckInterval = new ConfigKey<Long>(
145145
ConfigKey.CATEGORY_NETWORK, Long.class, "vpn.customer.gateway.obsolete.check.interval", "0",
146-
"Interval in minutes to periodically check VPN customer gateways for obsolete/excluded parameters and generate events and alerts. " +
146+
"Interval in hours to periodically check VPN customer gateways for obsolete/excluded parameters and generate events and alerts. " +
147147
"Set to 0 to disable. Default: 0 (disabled).",
148148
true, ConfigKey.Scope.Global);
149149

@@ -1155,8 +1155,8 @@ public boolean start() {
11551155
final long checkInterval = VpnCustomerGatewayObsoleteCheckInterval.value();
11561156
if (checkInterval > 0) {
11571157
TimerTask task = new CheckVpnCustomerGatewayObsoleteParametersTask();
1158-
_vpnCheckTimer.schedule(task, checkInterval * 60 * 1000L, checkInterval * 60 * 1000L);
1159-
logger.info("Scheduled VPN customer gateway obsolete parameters check with interval: " + checkInterval + " minutes");
1158+
_vpnCheckTimer.schedule(task, checkInterval * 60 * 60 * 1000L, checkInterval * 60 * 60 * 1000L);
1159+
logger.info("Scheduled VPN customer gateway obsolete parameters check with interval: " + checkInterval + " hours");
11601160
} else {
11611161
logger.debug("VPN customer gateway obsolete check is disabled (interval = 0)");
11621162
}
@@ -1225,7 +1225,6 @@ protected void runInContext() {
12251225
}
12261226
if (CollectionUtils.isNotEmpty(message)) {
12271227
String subject = String.format("VPN customer gateways using " + String.join(", ", message));
1228-
_alertMgr.clearAlert(AlertService.AlertType.ALERT_TYPE_VPN_GATEWAY_OBSOLETE_PARAMETERS, 0L, 0L);
12291228
_alertMgr.sendAlert(AlertService.AlertType.ALERT_TYPE_VPN_GATEWAY_OBSOLETE_PARAMETERS, 0L, 0L, subject, null);
12301229
}
12311230
}

0 commit comments

Comments
 (0)