|
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.poller.monitors.IPv4Monitor
org.opennms.netmgt.poller.monitors.SnmpMonitor
This class is designed to be used by the service poller framework to test the availability of the SNMP service on remote interfaces. The class implements the ServiceMonitor interface that allows it to be used along with other plug-ins by the service poller framework.
Field Summary | |
private static java.lang.String |
DEFAULT_OBJECT_IDENTIFIER
Default object to collect if "oid" property not available. |
private static int |
DEFAULT_PORT
The default port on which the host is checked to see if it supports SNMP. |
(package private) static java.lang.String |
EQUALS
|
(package private) static java.lang.String |
GREATER_THAN
|
(package private) static java.lang.String |
GREATER_THAN_EQUALS
|
(package private) static java.lang.String |
LESS_THAN
Constant for less-than operand |
(package private) static java.lang.String |
LESS_THAN_EQUALS
|
(package private) static java.lang.String |
MATCHES
|
(package private) static java.lang.String |
NOT_EQUAL
|
private static java.lang.String |
SERVICE_NAME
Name of monitored service. |
(package private) static java.lang.String |
SNMP_PEER_KEY
Interface attribute key used to store the interface's JoeSNMP SnmpPeer object. |
Fields inherited from interface org.opennms.netmgt.poller.monitors.ServiceMonitor |
SERVICE_AVAILABLE, SERVICE_STATUS_MASK, SERVICE_UNAVAILABLE, SERVICE_UNKNOWN, SERVICE_UNRESPONSIVE, SURPRESS_EVENT_MASK |
Constructor Summary | |
SnmpMonitor()
|
Method Summary | |
void |
initialize(NetworkInterface iface)
Called by the poller framework when an interface is being added to the scheduler. |
void |
initialize(PollerConfig pollerConfig,
java.util.Map parameters)
Initialize the service monitor. |
boolean |
meetsCriteria(SnmpSyntax result,
java.lang.String operator,
java.lang.String operand)
Verifies that the result of the SNMP query meets the criteria specified by the operator and the operand from the configuartion file. |
int |
poll(NetworkInterface iface,
java.util.Map parameters,
Package pkg)
The poll() method is responsible for polling the specified address for SNMP service availability. |
java.lang.String |
serviceName()
Returns the name of the service that the plug-in monitors ("SNMP"). |
Methods inherited from class org.opennms.netmgt.poller.monitors.IPv4Monitor |
release, release |
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 SERVICE_NAME
private static int DEFAULT_PORT
The default port on which the host is checked to see if it supports SNMP.
private static final java.lang.String DEFAULT_OBJECT_IDENTIFIER
static final java.lang.String SNMP_PEER_KEY
static final java.lang.String LESS_THAN
static final java.lang.String GREATER_THAN
static final java.lang.String LESS_THAN_EQUALS
static final java.lang.String GREATER_THAN_EQUALS
static final java.lang.String EQUALS
static final java.lang.String NOT_EQUAL
static final java.lang.String MATCHES
Constructor Detail |
public SnmpMonitor()
Method Detail |
public java.lang.String serviceName()
Returns the name of the service that the plug-in monitors ("SNMP").
public void initialize(PollerConfig pollerConfig, java.util.Map parameters)
Initialize the service monitor.
initialize
in interface ServiceMonitor
initialize
in class IPv4Monitor
parameters
- Not currently used.
java.lang.RuntimeException
- Thrown if an unrecoverable error occurs that prevents the
plug-in from functioning.public void initialize(NetworkInterface iface)
Called by the poller framework when an interface is being added to the scheduler. Here we perform any necessary initialization to prepare the NetworkInterface object for polling.
initialize
in interface ServiceMonitor
initialize
in class IPv4Monitor
iface
- The network interface to be initialized.
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)
The poll() method is responsible for polling the specified address for SNMP service availability.
iface
- The network interface to test the service on.parameters
- The package parameters (timeout, retry, etc...) to be used for
this poll.
java.lang.RuntimeException
- Thrown for any uncrecoverable errors.ServiceMonitor.SURPRESS_EVENT_MASK
,
ServiceMonitor.SERVICE_AVAILABLE
,
ServiceMonitor.SERVICE_UNAVAILABLE
public boolean meetsCriteria(SnmpSyntax result, java.lang.String operator, java.lang.String operand)
result
- operator
- operand
-
|
OpenNMS API 1.2.3 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |