if (!isCleanUp)
throw e;
}
// bind lb monitor lb_metric_table_mon -metric cpu -metricThreshold 1
lbmonitor_metric_binding monitor_metric_binding = new lbmonitor_metric_binding();
;
try {
monitor_metric_binding.set_monitorname(monitorName);
monitor_metric_binding.set_metric(counterName);
/*
* 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);
lbmonitor_metric_binding.add(_netscalerService, monitor_metric_binding);
} catch (Exception e) {
// Ignore Exception on cleanup
if (!isCleanUp)
throw e;