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, PARMS_ALL, PARMS_NAMES, PARMS_VALUES, PERCENT, 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_OPERINSTR, TAG_PERCENT_SIGN, 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() |
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 inp,
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[
|
protected String |
getAssetFieldValue(String parm,
long nodeId)
Helper method.
|
protected String |
getForeignId(long nodeId)
Retrieve foreign id from the node table of the database given a particular nodeId.
|
protected 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.
|
protected String |
getIfAlias(long nodeId,
String ipaddr)
Retrieve ifAlias from the snmpinterface table of the database given a particular
nodeId and ipAddr.
|
protected String |
getNodeLabel(long nodeId)
Retrieve nodeLabel from the node table of the database given a particular
nodeId.
|
escape, expandMapValues, getAllParamValues, getAllParmNames, getAllParmValues, getEventHost, getInstance, getNamedParmValue, getNumParmName, getNumParmValue, getValueOfParm, setInstance, splitAndExtract
protected String getNodeLabel(long nodeId)
AbstractEventUtil
getNodeLabel
in class AbstractEventUtil
nodeId
- Node identifierprotected String getForeignSource(long nodeId)
AbstractEventUtil
getForeignSource
in class AbstractEventUtil
nodeId
- Node identifierprotected String getForeignId(long nodeId)
AbstractEventUtil
getForeignId
in class AbstractEventUtil
nodeId
- Node identifierprotected String getIfAlias(long nodeId, String ipaddr)
AbstractEventUtil
getIfAlias
in class AbstractEventUtil
nodeId
- Node identifierprotected String getAssetFieldValue(String parm, long nodeId)
AbstractEventUtil
getAssetFieldValue
in class AbstractEventUtil
public String getHostName(int nodeId, String hostip)
nodeId
- Node IDhostip
- The event host@Transactional(readOnly=true) public 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.@Transactional(readOnly=true) public String expandParms(String inp, Event event, Map<String,Map<String,String>> decode)
AbstractEventUtil
expandParms
in interface EventUtil
expandParms
in class AbstractEventUtil
inp
- the input string in which parm values are to be expandedevent
- a Event
object.decode
- the varbind decode for thisCopyright © 2017. All rights reserved.