@Override public void visitMonitoredService(OnmsMonitoredService svc) { LOG.debug("visitMonitoredService({}) - currentOutages.isEmpty = {}", svc, svc.getCurrentOutages().isEmpty()); if ("A".equals(svc.getStatus()) && !svc.getCurrentOutages().isEmpty()) { if (AggregateStatus.ALL_NODES_UP.equals(m_status)) { m_status = AggregateStatus.ONE_SERVICE_DOWN; } } else if ("A".equals(svc.getStatus())) { m_isCurrentNodeDown = false; } }
@Override public void visitMonitoredService(OnmsMonitoredService svc) { LOG.debug("visitMonitoredService({}) - currentOutages.isEmpty = {}", svc, svc.getCurrentOutages().isEmpty()); if ("A".equals(svc.getStatus()) && !svc.getCurrentOutages().isEmpty()) { if (AggregateStatus.ALL_NODES_UP.equals(m_status)) { m_status = AggregateStatus.ONE_SERVICE_DOWN; } } else if ("A".equals(svc.getStatus())) { m_isCurrentNodeDown = false; } }
/** * When we save an outage, make sure to add the outage to the currentOutages * property of {@link OnmsMonitoredService}. */ @Override public Integer save(final OnmsOutage entity) { Integer retval = super.save(entity); if (entity.getIfRegainedService() == null) { entity.getMonitoredService().getCurrentOutages().add(entity); } return retval; }
/** * When we save an outage, make sure to add the outage to the currentOutages * property of {@link OnmsMonitoredService}. */ @Override public Integer save(final OnmsOutage entity) { Integer retval = super.save(entity); if (entity.getIfRegainedService() == null) { entity.getMonitoredService().getCurrentOutages().add(entity); } return retval; }
private boolean scheduleService(OnmsMonitoredService service) { final OnmsIpInterface iface = service.getIpInterface(); final Set<OnmsOutage> outages = service.getCurrentOutages(); final OnmsOutage outage = (outages == null || outages.size() < 1 ? null : outages.iterator().next()); final OnmsEvent event = (outage == null ? null : outage.getServiceLostEvent());