public class EventUtilDaoImpl extends AbstractEventUtil
ASSET_BEGIN, ASSET_END_SUFFIX, ATTRIB_DELIM, HARDWARE_BEGIN, HARDWARE_END_SUFFIX, NAME_VAL_DELIM, NUM_PARMS_STR, PARM_BEGIN, PARM_BEGIN_LENGTH, PARM_END_SUFFIX, PARM_NAME_NUMBERED_PREFIX, PARM_NAME_NUMBERED_PREFIX_LENGTH, PARM_NUM_PREFIX, PARM_NUM_PREFIX_LENGTH, PARM_REGEX, PARMS_ALL, PARMS_NAMES, PARMS_VALUES, SPACE_DELIM, TAG_DESCR, TAG_DPNAME, TAG_EVENT_DB_ID, TAG_FOREIGNID, TAG_FOREIGNSOURCE, TAG_HOST, TAG_IFALIAS, TAG_IFINDEX, TAG_INTERFACE, TAG_INTERFACE_RESOLVE, TAG_LOGMSG, TAG_MOUSEOVERTEXT, TAG_NODEID, TAG_NODELABEL, TAG_NODELOCATION, TAG_OPERINSTR, TAG_PERCENT_SIGN, TAG_PRIMARY_INTERFACE_ADDRESS, TAG_SERVICE, TAG_SEVERITY, TAG_SHORT_TIME, TAG_SNMP, TAG_SNMP_COMMUNITY, TAG_SNMP_GENERIC, TAG_SNMP_ID, TAG_SNMP_IDTEXT, TAG_SNMP_SPECIFIC, TAG_SNMP_VERSION, TAG_SNMPHOST, TAG_SOURCE, TAG_TIME, TAG_TTICKET_ID, TAG_UEI
Constructor and Description |
---|
EventUtilDaoImpl() |
EventUtilDaoImpl(com.codahale.metrics.MetricRegistry registry) |
Modifier and Type | Method and Description |
---|---|
String |
expandParms(String inp,
Event event)
Expand the value if it has parms in one of the following formats -
%element% values are expanded to have the value of the element where
'element' is an element in the event DTD - %parm[values-all]% is expanded
to a delimited list of all parmblock values - %parm[names-all]% is
expanded to a list of all parm names - %parm[all]% is expanded to a full
dump of all parmblocks - %parm[name]% is expanded to the value of the
parameter named 'name' - %parm[
|
String |
expandParms(String input,
Event event,
Map<String,Map<String,String>> decode)
Expand the value if it has parms in one of the following formats -
%element% values are expanded to have the value of the element where
'element' is an element in the event DTD - %parm[values-all]% is expanded
to a delimited list of all parmblock values - %parm[names-all]% is
expanded to a list of all parm names - %parm[all]% is expanded to a full
dump of all parmblocks - %parm[name]% is expanded to the value of the
parameter named 'name' - %parm[
|
String |
getAssetFieldValue(String parm,
long nodeId)
Helper method.
|
String |
getForeignId(long nodeId)
Retrieve foreign id from the node table of the database given a particular nodeId.
|
String |
getForeignSource(long nodeId)
Retrieve foreign source from the node table of the database given a particular
nodeId.
|
String |
getHardwareFieldValue(String parm,
long nodeId) |
String |
getHostName(int nodeId,
String hostip)
This method is used to convert the event host into a hostname id by
performing a lookup in the database.
|
String |
getIfAlias(long nodeId,
String ipaddr)
Retrieve ifAlias from the snmpinterface table of the database given a particular
nodeId and ipAddr.
|
String |
getNodeLabel(long nodeId)
Retrieve nodeLabel from the node table of the database given a particular
nodeId.
|
String |
getNodeLocation(long nodeId)
Retrieve nodeLocation from the node table of the database given a particular
nodeId.
|
String |
getPrimaryInterface(long nodeId) |
decodeSnmpV2TcDateAndTime, escape, expandMapValues, getAllParamValues, getAllParmNames, getAllParmValues, getEventHost, getInstance, getNamedParmValue, getNumParmName, getNumParmValue, getResolver, setInstance, splitAndExtract
public EventUtilDaoImpl()
public EventUtilDaoImpl(com.codahale.metrics.MetricRegistry registry)
public String getNodeLabel(long nodeId)
EventUtil
nodeId
- Node identifierpublic String getPrimaryInterface(long nodeId)
public String getNodeLocation(long nodeId)
EventUtil
nodeId
- Node identifierpublic String getForeignSource(long nodeId)
EventUtil
nodeId
- Node identifierpublic String getForeignId(long nodeId)
EventUtil
nodeId
- Node identifierpublic String getIfAlias(long nodeId, String ipaddr)
EventUtil
nodeId
- Node identifieripaddr
- Interface IP addresspublic String getAssetFieldValue(String parm, long nodeId)
EventUtil
public String getHostName(int nodeId, String hostip)
nodeId
- Node IDhostip
- The event hostpublic String expandParms(String inp, Event event)
AbstractEventUtil
expandParms
in interface EventUtil
expandParms
in class AbstractEventUtil
inp
- the input string in which parm values are to be expandedevent
- a Event
object.public String expandParms(String input, Event event, Map<String,Map<String,String>> decode)
AbstractEventUtil
expandParms
in interface EventUtil
expandParms
in class AbstractEventUtil
input
- the input string in which parm values are to be expandedevent
- a Event
object.decode
- the varbind decode for thisCopyright © 2021. All rights reserved.