|
OpenNMS API 1.1.3 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.opennms.netmgt.poller.IPv4LatencyMonitor
org.opennms.netmgt.poller.JDBCMonitor
This class implements a basic JDBC monitoring framework; The idea is than these tests doesn't take too long
(or too much resources to run) and provide the basic healt information about the polled server.
See src/services/org/opennms/netmgt/poller
OpenNMS plugin information at OpenNMS developer site
Field Summary | |
static int |
DEFAULT_RETRY
Default number of times to retry a test |
static int |
DEFAULT_TIMEOUT
Number of miliseconds to wait before timing out a database login using JDBC Hint: 1 minute is 6000 miliseconds. |
(package private) static java.lang.String |
DS_NAME
RRD data source name which doubles as the RRD file name. |
(package private) Interface |
m_rrdInterface
Interface object which provides access to RRD functions via JNI. |
Fields inherited from interface org.opennms.netmgt.poller.ServiceMonitor |
SERVICE_AVAILABLE, SERVICE_STATUS_MASK, SERVICE_UNAVAILABLE, SERVICE_UNRESPONSIVE, SURPRESS_EVENT_MASK |
Constructor Summary | |
JDBCMonitor()
Class constructor. |
Method Summary | |
boolean |
createRRD(Interface rrdJniInterface,
java.lang.String repository,
java.net.InetAddress addr,
java.lang.String dsName,
Package pkg)
Create an RRD database file for storing latency/response time data. |
void |
initialize(java.util.Map parameters)
This method is called after the framework loads the plugin. |
void |
initialize(NetworkInterface iface)
This method is called when an interface that support the service is added to the scheduling service. |
int |
poll(NetworkInterface iface,
java.util.Map parameters,
Package pkg)
Network interface to poll for a given service. |
void |
release()
Release any used services by the plugin,normally during framework exit For now this method is just an 'adaptor', does nothing |
void |
release(NetworkInterface iface)
This method is the called whenever an interface is being removed from the scheduler. |
void |
updateRRD(Interface rrdJniInterface,
java.lang.String repository,
java.net.InetAddress addr,
java.lang.String dsName,
long value,
Package pkg)
Update an RRD database file with latency/response time data. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final int DEFAULT_TIMEOUT
public static final int DEFAULT_RETRY
Interface m_rrdInterface
static java.lang.String DS_NAME
Constructor Detail |
public JDBCMonitor() throws java.lang.ClassNotFoundException, java.lang.InstantiationException, java.lang.IllegalAccessException
Method Detail |
public void initialize(java.util.Map parameters)
initialize
in interface ServiceMonitor
initialize
in class IPv4LatencyMonitor
parameters
- Configuration parameters passed to the plugin
java.lang.RuntimeException
- If there is any error that prevents the plugin from runningpublic void release()
release
in interface ServiceMonitor
release
in class IPv4LatencyMonitor
java.lang.RuntimeException
- Thrown if an error occurs during deallocation.public void initialize(NetworkInterface iface)
initialize
in interface ServiceMonitor
initialize
in class IPv4LatencyMonitor
iface
- The network interface to poll
java.lang.RuntimeException
- Thrown if an unrecoverable error
occurs that prevents the interface from being monitored.
NetworkInterfaceNotSupportedException
- Thrown
if the passed interface is invalid for this monitor.public void release(NetworkInterface iface)
This method is the called whenever an interface is being removed from the scheduler. For now this method is just an 'adaptor', does nothing
release
in interface ServiceMonitor
release
in class IPv4LatencyMonitor
iface
- The network interface that was being monitored.
java.lang.RuntimeException
- Thrown if an unrecoverable error
occurs that prevents the interface from being monitored.public int poll(NetworkInterface iface, java.util.Map parameters, Package pkg)
iface
- The interface to pollparameters
- Parameters to pass when polling the interface
Currently recognized Map keys:
java.lang.RuntimeException
- Thrown if an unrecoverable error
occurs that prevents the interface from being monitored.ServiceMonitor.SURPRESS_EVENT_MASK
,
ServiceMonitor.SERVICE_AVAILABLE
,
ServiceMonitor.SERVICE_UNAVAILABLE
,
ServiceMonitor.SERVICE_UNRESPONSIVE
,
Error codes for JConnectpublic boolean createRRD(Interface rrdJniInterface, java.lang.String repository, java.net.InetAddress addr, java.lang.String dsName, Package pkg)
rrdJniInterface
- interface used to issue RRD commands.repository
- path to the RRD file repositoryaddr
- interface addressdsName
- data source/RRD file name
public void updateRRD(Interface rrdJniInterface, java.lang.String repository, java.net.InetAddress addr, java.lang.String dsName, long value, Package pkg)
rrdJniInterface
- interface used to issue RRD commands.repository
- path to the RRD file repositoryaddr
- interface addressvalue
- value to update the RRD file with
|
OpenNMS API 1.1.3 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |