How to append a monitor to existing monitors
Hi All,
I have created a monitor using below java code.But when I run this code all the existing monitors are removed and the monitor given in the code is added to the pool.Could anyone tell me how to append a new monitor to a pool.
String[] monitors = new String[1]; monitors[0] = "Test_Template1"; iControl.LocalLBMonitorRule rule = new iControl.LocalLBMonitorRule(); rule.setQuorum(0L); rule.setType(iControl.LocalLBMonitorRuleType.MONITOR_RULE_TYPE_SINGLE); rule.setMonitor_templates(monitors); iControl.LocalLBPoolMonitorAssociation[] monitor_associations = new iControl.LocalLBPoolMonitorAssociation[1]; monitor_associations[0] = new iControl.LocalLBPoolMonitorAssociation(); monitor_associations[0].setMonitor_rule(rule); monitor_associations[0].setPool_name(poolname); m_interfaces.getLocalLBPool().set_monitor_association(monitor_associations);