@Test public void testBug3575() throws Exception { initFactories("/threshd-configuration-bug3575.xml","/test-thresholds-bug3575.xml"); String ipAddress = "127.0.0.1"; String ifName = "eth0"; setupSnmpInterfaceDatabase(ipAddress, ifName); LatencyThresholdingSet thresholdingSet = new LatencyThresholdingSet(1, ipAddress, "StrafePing", getRepository()); assertTrue(thresholdingSet.hasThresholds()); Map<String, Double> attributes = new HashMap<String, Double>(); for (double i=1; i<21; i++) attributes.put("ping" + i, 2 * i); attributes.put("loss", 60.0); attributes.put("response-time", 100.0); attributes.put("median", 100.0); assertTrue(thresholdingSet.hasThresholds(attributes)); List<Event> triggerEvents = thresholdingSet.applyThresholds("StrafePing", attributes); assertTrue(triggerEvents.size() == 1); addEvent(EventConstants.HIGH_THRESHOLD_EVENT_UEI, "127.0.0.1", "StrafePing", 1, 50.0, 25.0, 60.0, ifName, "127.0.0.1[StrafePing]", "loss", "eth0", null, m_anticipator, m_anticipatedEvents); ThresholdingEventProxy proxy = new ThresholdingEventProxy(); proxy.add(triggerEvents); proxy.sendAllEvents(); verifyEvents(0); }
public boolean hasThresholds() { return m_thresholdingSet.hasThresholds(); }
ThresholdingVisitor extends AbstractCollectionSetVisitor { public boolean hasThresholds() { return m_thresholdingSet.hasThresholds(); } }
ThresholdingVisitor extends AbstractCollectionSetVisitor { public boolean hasThresholds() { return m_thresholdingSet.hasThresholds(); } protected  ThresholdingVisitor(CollectorThresholdingSet thresholdingSet); }
ThresholdingVisitor extends AbstractCollectionSetVisitor { public boolean hasThresholds() { return m_thresholdingSet.hasThresholds(); } protected  ThresholdingVisitor(CollectorThresholdingSet thresholdingSet); static ThresholdingVisitor create(int nodeId, String hostAddress, String serviceName, RrdRepository repo, ServiceParameters svcParams); boolean hasThresholds(); @Override void visitCollectionSet(CollectionSet set); void reload(); void reloadScheduledOutages(); boolean isNodeInOutage(); @Override void visitResource(CollectionResource resource); @Override void visitAttribute(CollectionAttribute attribute); @Override void completeResource(CollectionResource resource); Date getCollectionTimestamp(); @Override String toString(); }
ThresholdingVisitor extends AbstractCollectionSetVisitor { public boolean hasThresholds() { return m_thresholdingSet.hasThresholds(); } protected  ThresholdingVisitor(CollectorThresholdingSet thresholdingSet); static ThresholdingVisitor create(int nodeId, String hostAddress, String serviceName, RrdRepository repo, ServiceParameters svcParams); boolean hasThresholds(); @Override void visitCollectionSet(CollectionSet set); void reload(); void reloadScheduledOutages(); boolean isNodeInOutage(); @Override void visitResource(CollectionResource resource); @Override void visitAttribute(CollectionAttribute attribute); @Override void completeResource(CollectionResource resource); Date getCollectionTimestamp(); @Override String toString();  }