|
OpenNMS API 1.2.3 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.opennms.netmgt.threshd.LatencyThresholder
The LatencyThresholder class ...
Field Summary | |
private static int |
DEFAULT_INTERVAL
Default thresholding interval (in milliseconds). |
private java.lang.String |
m_host
Local host name |
private java.lang.String |
m_svcName
Specific service that this thresholder is responsible for latency threshold checking. |
(package private) static java.lang.String |
NODE_ID_KEY
Interface attribute key used to store the interface's node id |
(package private) static java.lang.String |
RRD_REPOSITORY_KEY
Interface attribute key used to store the interface's node id |
private static java.lang.String |
SQL_GET_NODEID
SQL statement to retrieve interface's 'ipinterface' table information. |
(package private) static java.lang.String |
THRESHOLD_MAP_KEY
Interface attribute key used to store configured thresholds |
Fields inherited from interface org.opennms.netmgt.threshd.ServiceThresholder |
statusType, THRESHOLDING_FAILED, THRESHOLDING_SUCCEEDED, THRESHOLDING_UNKNOWN |
Constructor Summary | |
(package private) |
LatencyThresholder()
|
Method Summary | |
int |
check(NetworkInterface iface,
EventProxy eproxy,
java.util.Map parameters)
Perform threshold checking. |
private void |
checkRrdDir(java.io.File directory,
int nodeId,
java.net.InetAddress ipAddr,
int interval,
java.util.Date date,
java.util.Map thresholdMap,
Events events)
Performs threshold checking on an directory which contains one or more RRD files containing latency/response time information. |
private Event |
createEvent(int nodeId,
java.net.InetAddress ipAddr,
double dsValue,
Threshold threshold,
java.lang.String uei,
java.util.Date date)
Creates a new threshold event from the specified parms. |
void |
initialize(java.util.Map parameters)
Initialize the service thresholder. |
void |
initialize(NetworkInterface iface,
java.util.Map parameters)
Responsible for performing all necessary initialization for the specified interface in preparation for thresholding. |
void |
release()
Responsible for freeing up any resources held by the thresholder. |
void |
release(NetworkInterface iface)
Responsible for releasing any resources associated with the specified interface. |
java.lang.String |
serviceName()
Returns the name of the service that the plug-in threshold checks. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private static final java.lang.String SQL_GET_NODEID
private static final int DEFAULT_INTERVAL
static final java.lang.String RRD_REPOSITORY_KEY
static final java.lang.String THRESHOLD_MAP_KEY
static final java.lang.String NODE_ID_KEY
private java.lang.String m_svcName
private java.lang.String m_host
Constructor Detail |
LatencyThresholder()
Method Detail |
public java.lang.String serviceName()
Returns the name of the service that the plug-in threshold checks.
public void initialize(java.util.Map parameters)
Initialize the service thresholder.
initialize
in interface ServiceThresholder
parameters
- Parameter map which contains (currently) a single entry, the
name of the service which this thresholder is responsible for
latency threshold checking keyed by the String "svcName"
java.lang.RuntimeException
- Thrown if an unrecoverable error occurs that prevents the
plug-in from functioning.public void release()
release
in interface ServiceThresholder
public void initialize(NetworkInterface iface, java.util.Map parameters)
initialize
in interface ServiceThresholder
iface
- Network interface to be prepped for thresholding.parameters
- Key/value pairs associated with the package to which the
interface belongs..public void release(NetworkInterface iface)
release
in interface ServiceThresholder
iface
- Network interface to be released.public int check(NetworkInterface iface, EventProxy eproxy, java.util.Map parameters)
check
in interface ServiceThresholder
iface
- Network interface to be data collected.eproxy
- Eventy proxy for sending events.parameters
- Key/value pairs from the package to which the interface
belongs.private void checkRrdDir(java.io.File directory, int nodeId, java.net.InetAddress ipAddr, int interval, java.util.Date date, java.util.Map thresholdMap, Events events) throws java.lang.IllegalArgumentException
directory
- RRD repository directorynodeId
- Node identifier of interface being checkedipAddr
- IP address of the interface being checkedinterval
- Configured thresholding intervaldate
- Source for timestamp to be used for all generated eventsthresholdMap
- Map of configured interface level ThresholdEntity objects
keyed by datasource name.events
- Castor events object containing any events to be generated as
a result of threshold checking.
java.lang.IllegalArgumentException
- if path parameter is not a directory.private Event createEvent(int nodeId, java.net.InetAddress ipAddr, double dsValue, Threshold threshold, java.lang.String uei, java.util.Date date)
nodeId
- Node identifier of the affected interfaceipAddr
- IP address of the affected interfacedsValue
- Data source value which triggered the threshold eventthreshold
- Configured thresholduei
- Event identifierdate
- source of event's timestamp
|
OpenNMS API 1.2.3 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |