@Test public void testFetchUnclearedHypericAlarms() throws Exception { List<OnmsAlarm> alarms = m_processor.fetchUnclearedHypericAlarms(); System.out.println(alarms.size()); }
public List<OnmsAlarm> fetchUnclearedHypericAlarms() { OnmsCriteria criteria = new OnmsCriteria(OnmsAlarm.class, "alarm"); criteria.add(Restrictions.eq("uei", "uei.opennms.org/external/hyperic/alert")); criteria.add(Restrictions.gt("severity", OnmsSeverity.NORMAL)); return m_alarmDao.findMatching(criteria); }
HypericAckProcessor implements AckProcessor { public List<OnmsAlarm> fetchUnclearedHypericAlarms() { OnmsCriteria criteria = new OnmsCriteria(OnmsAlarm.class, "alarm"); criteria.add(Restrictions.eq("uei", "uei.opennms.org/external/hyperic/alert")); criteria.add(Restrictions.gt("severity", OnmsSeverity.NORMAL)); return m_alarmDao.findMatching(criteria); } }
HypericAckProcessor implements AckProcessor { public List<OnmsAlarm> fetchUnclearedHypericAlarms() { OnmsCriteria criteria = new OnmsCriteria(OnmsAlarm.class, "alarm"); criteria.add(Restrictions.eq("uei", "uei.opennms.org/external/hyperic/alert")); criteria.add(Restrictions.gt("severity", OnmsSeverity.NORMAL)); return m_alarmDao.findMatching(criteria); }  }
HypericAckProcessor implements AckProcessor { public List<OnmsAlarm> fetchUnclearedHypericAlarms() { OnmsCriteria criteria = new OnmsCriteria(OnmsAlarm.class, "alarm"); criteria.add(Restrictions.eq("uei", "uei.opennms.org/external/hyperic/alert")); criteria.add(Restrictions.gt("severity", OnmsSeverity.NORMAL)); return m_alarmDao.findMatching(criteria); }  void reloadConfigs(); List<OnmsAlarm> fetchUnclearedHypericAlarms(); String getUrlForHypericSource(String source); void run(); static OnmsAlarm findAlarmForHypericAlert(List<OnmsAlarm> alarms, String platformId, HypericAlertStatus alert); static String getAlertSourceParmValue(OnmsAlarm alarm); static String getAlertIdParmValue(OnmsAlarm alarm); static String getParmValueByRegex(OnmsAlarm alarm, String regex); static List<HypericAlertStatus> fetchHypericAlerts(String hypericUrl, List<String> alertIds); static List<HypericAlertStatus> parseHypericAlerts(Reader reader); synchronized void setAckdConfigDao(final AckdConfigurationDao configDao); synchronized void setAckService(final AckService ackService); @Override void afterPropertiesSet(); synchronized void setAlarmDao(final AlarmDao dao); }
HypericAckProcessor implements AckProcessor { public List<OnmsAlarm> fetchUnclearedHypericAlarms() { OnmsCriteria criteria = new OnmsCriteria(OnmsAlarm.class, "alarm"); criteria.add(Restrictions.eq("uei", "uei.opennms.org/external/hyperic/alert")); criteria.add(Restrictions.gt("severity", OnmsSeverity.NORMAL)); return m_alarmDao.findMatching(criteria); }  void reloadConfigs(); List<OnmsAlarm> fetchUnclearedHypericAlarms(); String getUrlForHypericSource(String source); void run(); static OnmsAlarm findAlarmForHypericAlert(List<OnmsAlarm> alarms, String platformId, HypericAlertStatus alert); static String getAlertSourceParmValue(OnmsAlarm alarm); static String getAlertIdParmValue(OnmsAlarm alarm); static String getParmValueByRegex(OnmsAlarm alarm, String regex); static List<HypericAlertStatus> fetchHypericAlerts(String hypericUrl, List<String> alertIds); static List<HypericAlertStatus> parseHypericAlerts(Reader reader); synchronized void setAckdConfigDao(final AckdConfigurationDao configDao); synchronized void setAckService(final AckService ackService); @Override void afterPropertiesSet(); synchronized void setAlarmDao(final AlarmDao dao); static final String READER_NAME_HYPERIC; static final String PARAMETER_PREFIX_HYPERIC_SOURCE; static final int ALERTS_PER_HTTP_TRANSACTION; }