From c46890bc7b3b11d77b5268687a559de8d43da622 Mon Sep 17 00:00:00 2001 From: Vijay Date: Thu, 23 Aug 2012 18:24:07 +0530 Subject: [PATCH] AutoScale. To set a max value for metric thresholds which will not affect traffic. Reviewed-By: Devdeep Singh --- core/src/com/cloud/network/resource/NetscalerResource.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/core/src/com/cloud/network/resource/NetscalerResource.java b/core/src/com/cloud/network/resource/NetscalerResource.java index c295c51a947..b18793cc365 100644 --- a/core/src/com/cloud/network/resource/NetscalerResource.java +++ b/core/src/com/cloud/network/resource/NetscalerResource.java @@ -1855,7 +1855,12 @@ public class NetscalerResource implements ServerResource { try { monitor_metric_binding.set_monitorname(monitorName); monitor_metric_binding.set_metric(counterName); - monitor_metric_binding.set_metricthreshold(1); + /* + * Setting it to max to make sure traffic is not affected due to 'LOAD' monitoring. + * For Ex. if CPU is tracked and CPU is greater than 80, it is still < than Integer.MAX_VALUE + * so traffic will continue to flow. + */ + monitor_metric_binding.set_metricthreshold(Integer.MAX_VALUE); monitor_metric_binding.add(_netscalerService, monitor_metric_binding); } catch (Exception e) { // Ignore Exception on cleanup