public class HypericAckProcessor extends Object implements AckProcessor
HypericAckProcessor class.
| Modifier and Type | Field and Description |
|---|---|
static int |
ALERTS_PER_HTTP_TRANSACTION
Constant
ALERTS_PER_HTTP_TRANSACTION=200 |
static String |
PARAMETER_PREFIX_HYPERIC_SOURCE
Constant
PARAMETER_PREFIX_HYPERIC_SOURCE="source:" |
static String |
READER_NAME_HYPERIC
Constant
READER_NAME_HYPERIC="HypericReader" |
| Constructor and Description |
|---|
HypericAckProcessor() |
| Modifier and Type | Method and Description |
|---|---|
void |
afterPropertiesSet()
afterPropertiesSet
|
static List<org.opennms.netmgt.ackd.readers.HypericAckProcessor.HypericAlertStatus> |
fetchHypericAlerts(String hypericUrl,
List<String> alertIds)
fetchHypericAlerts
|
List<OnmsAlarm> |
fetchUnclearedHypericAlarms()
fetchUnclearedHypericAlarms
|
static OnmsAlarm |
findAlarmForHypericAlert(List<OnmsAlarm> alarms,
String platformId,
org.opennms.netmgt.ackd.readers.HypericAckProcessor.HypericAlertStatus alert)
findAlarmForHypericAlert
|
static String |
getAlertIdParmValue(OnmsAlarm alarm)
getAlertIdParmValue
|
static String |
getAlertSourceParmValue(OnmsAlarm alarm)
getAlertSourceParmValue
|
static String |
getParmValueByRegex(OnmsAlarm alarm,
String regex)
Some parameter values that you might be interested in inside this class:
|
String |
getUrlForHypericSource(String source)
getUrlForHypericSource
|
static List<org.opennms.netmgt.ackd.readers.HypericAckProcessor.HypericAlertStatus> |
parseHypericAlerts(Reader reader)
parseHypericAlerts
|
void |
reloadConfigs()
reloadConfigs
|
void |
run()
run
|
void |
setAckdConfigDao(AckdConfigurationDao configDao)
setAckdConfigDao
|
void |
setAcknowledgmentDao(AcknowledgmentDao ackDao) |
void |
setAlarmDao(AlarmDao dao)
setAlarmDao
|
public static final String READER_NAME_HYPERIC
READER_NAME_HYPERIC="HypericReader"public static final String PARAMETER_PREFIX_HYPERIC_SOURCE
PARAMETER_PREFIX_HYPERIC_SOURCE="source:"public static final int ALERTS_PER_HTTP_TRANSACTION
ALERTS_PER_HTTP_TRANSACTION=200public void reloadConfigs()
reloadConfigs
reloadConfigs in interface AckProcessorpublic List<OnmsAlarm> fetchUnclearedHypericAlarms()
fetchUnclearedHypericAlarms
List object.public static OnmsAlarm findAlarmForHypericAlert(List<OnmsAlarm> alarms, String platformId, org.opennms.netmgt.ackd.readers.HypericAckProcessor.HypericAlertStatus alert)
findAlarmForHypericAlert
public static String getAlertSourceParmValue(OnmsAlarm alarm)
getAlertSourceParmValue
public static String getParmValueByRegex(OnmsAlarm alarm, String regex)
Some parameter values that you might be interested in inside this class:
alert.id: ID of the alert in the remote Hyperic HQ systemalert.baseURL: Base URL of the Hyperic HQ service that generated the alertalert.source: String key that identifies the Hyperic HQ service that generated the alertalarm - The alarm to fetch parameters fromregex - Java regex expression with a () group that will be returnedpublic static List<org.opennms.netmgt.ackd.readers.HypericAckProcessor.HypericAlertStatus> fetchHypericAlerts(String hypericUrl, List<String> alertIds) throws IOException, JAXBException, XMLStreamException
fetchHypericAlerts
hypericUrl - a String object.alertIds - a List object.List object.org.apache.commons.httpclient.HttpException - if any.IOException - if any.JAXBException - if any.XMLStreamException - if any.public static List<org.opennms.netmgt.ackd.readers.HypericAckProcessor.HypericAlertStatus> parseHypericAlerts(Reader reader) throws JAXBException, XMLStreamException
parseHypericAlerts
reader - a Reader object.List object.JAXBException - if any.XMLStreamException - if any.public void setAckdConfigDao(AckdConfigurationDao configDao)
setAckdConfigDao
configDao - a AckdConfigurationDao object.public void setAcknowledgmentDao(AcknowledgmentDao ackDao)
ackDao - a AcknowledgmentDao object.public void afterPropertiesSet()
throws Exception
afterPropertiesSet
afterPropertiesSet in interface org.springframework.beans.factory.InitializingBeanException - if any.Copyright © 2022. All rights reserved.