|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.opennms.netmgt.poller.monitors.IPv4Monitor
org.opennms.netmgt.poller.monitors.JDBCMonitor
@Distributable public class 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. |
| Constructor Summary | |
|---|---|
JDBCMonitor()
Class constructor. |
|
| Method Summary | |
|---|---|
PollStatus |
checkDatabaseStatus(Connection con,
Map parameters)
|
protected void |
closeStmt(Statement statement)
|
void |
initialize(Map parameters)
This method is called after the framework loads the plugin. |
void |
initialize(MonitoredService svc)
This method is called when an interface that support the service is added to the scheduling service. |
PollStatus |
poll(MonitoredService svc,
Map parameters)
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(MonitoredService svc)
This method is the called whenever an interface is being removed from the scheduler. |
| Methods inherited from class org.opennms.netmgt.poller.monitors.IPv4Monitor |
|---|
log, logDown, logDown, logUp |
| 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
| Constructor Detail |
|---|
public JDBCMonitor()
throws ClassNotFoundException,
InstantiationException,
IllegalAccessException
ClassNotFoundException
InstantiationException
IllegalAccessException| Method Detail |
|---|
public void initialize(Map parameters)
initialize in interface ServiceMonitorinitialize in class IPv4Monitorparameters - Configuration parameters passed to the plugin
RuntimeException - If there is any error that prevents the plugin from runningpublic void release()
release in interface ServiceMonitorrelease in class IPv4MonitorRuntimeException - Thrown if an error occurs during deallocation.public void initialize(MonitoredService svc)
initialize in interface ServiceMonitorinitialize in class IPv4Monitorsvc - TODO
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(MonitoredService svc)
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 ServiceMonitorrelease in class IPv4Monitorsvc - TODO
RuntimeException - Thrown if an unrecoverable error occurs that prevents the
interface from being monitored.
public PollStatus poll(MonitoredService svc,
Map parameters)
poll in interface ServiceMonitorpoll in class IPv4Monitorparameters - Parameters to pass when polling the interface Currently
recognized Map keys:
iface - The interface to poll
RuntimeException - Thrown if an unrecoverable error occurs that prevents the
interface from being monitored.org.opennms.netmgt.poller.ServiceMonitor#SERVICE_AVAILABLE,
org.opennms.netmgt.poller.ServiceMonitor#SERVICE_UNAVAILABLE,
org.opennms.netmgt.poller.ServiceMonitor#SERVICE_UNRESPONSIVE,
Error
codes for JConnect protected void closeStmt(Statement statement)
public PollStatus checkDatabaseStatus(Connection con,
Map parameters)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||