org.opennms.netmgt.poller.monitors
Class SshMonitor
java.lang.Object
org.opennms.netmgt.poller.monitors.IPv4Monitor
org.opennms.netmgt.poller.monitors.SshMonitor
- All Implemented Interfaces:
- ServiceMonitor
@Distributable
public final class SshMonitor
- extends IPv4Monitor
This class is designed to be used by the service poller framework to test the
availability of SSH remote interfaces. The class
implements the ServiceMonitor interface that allows it to be used along with
other plug-ins by the service poller framework.
- Author:
- Benjamin Reed, OpenNMS
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DEFAULT_TIMEOUT
public static final int DEFAULT_TIMEOUT
- See Also:
- Constant Field Values
DEFAULT_PORT
public static final int DEFAULT_PORT
- See Also:
- Constant Field Values
SshMonitor
public SshMonitor()
poll
public PollStatus poll(InetAddress address,
Map parameters)
- Poll an
InetAddress for SSH availability.
During the poll an attempt is made to connect on the specified port. If
the connection request is successful, the banner line generated by the
interface is parsed and if the banner text indicates that we are talking
to Provided that the interface's response is valid we mark the poll status
as available and return.
- Parameters:
address - the address to pollparameters - the package parameters (timeout, retry, etc...) to be used for this poll
- Returns:
- a
PollStatus status object
poll
public PollStatus poll(MonitoredService svc,
Map parameters)
- Poll the specified address for service availability.
- Specified by:
poll in interface ServiceMonitor- Specified by:
poll in class IPv4Monitor
- Parameters:
svc - the MonitoredService service object which defines what address to poll, etc.parameters - the package parameters (timeout, retry, etc.) to be used for this poll
- Returns:
- the availability of the interface
- See Also:
poll(InetAddress, Map)
Copyright © 2009. All Rights Reserved.