Class SnmpMonitorStrategy
- java.lang.Object
-
- org.opennms.netmgt.poller.support.AbstractServiceMonitor
-
- org.opennms.netmgt.poller.monitors.SnmpMonitorStrategy
-
- All Implemented Interfaces:
ServiceMonitor
- Direct Known Subclasses:
BgpSessionMonitor
,CiscoIpSlaMonitor
,CiscoPingMibMonitor
,DiskUsageMonitor
,DskTableMonitor
,HostResourceSwRunMonitor
,LaTableMonitor
,LogMatchTableMonitor
,NetScalerGroupHealthMonitor
,OmsaStorageMonitor
,OpenManageChassisMonitor
,PercMonitor
,PrTableMonitor
,SnmpMonitor
public abstract class SnmpMonitorStrategy extends AbstractServiceMonitor
Abstract SnmpMonitorStrategy class.
- Version:
- $Id: $
- Author:
- david
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
EQUALS
ConstantEQUALS="="
static java.lang.String
GREATER_THAN
ConstantGREATER_THAN=">"
static java.lang.String
GREATER_THAN_EQUALS
ConstantGREATER_THAN_EQUALS=">="
protected boolean
hex
static java.lang.String
LESS_THAN
Constant for less-than operandstatic java.lang.String
LESS_THAN_EQUALS
ConstantLESS_THAN_EQUALS="<="
static java.lang.String
MATCHES
ConstantMATCHES="~"
static java.lang.String
NOT_EQUAL
ConstantNOT_EQUAL="!="
-
Constructor Summary
Constructors Constructor Description SnmpMonitorStrategy()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SnmpAgentConfig
getAgentConfig(MonitoredService svc, java.util.Map<java.lang.String,java.lang.Object> parameters)
java.util.Map<java.lang.String,java.lang.Object>
getRuntimeAttributes(MonitoredService svc, java.util.Map<java.lang.String,java.lang.Object> parameters)
java.lang.String
getStringValue(SnmpValue result)
boolean
meetsCriteria(SnmpValue 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 configuration file.-
Methods inherited from class org.opennms.netmgt.poller.support.AbstractServiceMonitor
getEffectiveLocation, getKeyedBoolean, getKeyedInstance, getKeyedInteger, getKeyedLong, getKeyedObject, getKeyedString, getServiceProperties
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.opennms.netmgt.poller.ServiceMonitor
poll
-
-
-
-
Field Detail
-
LESS_THAN
public static final java.lang.String LESS_THAN
Constant for less-than operand- See Also:
- Constant Field Values
-
GREATER_THAN
public static final java.lang.String GREATER_THAN
ConstantGREATER_THAN=">"
- See Also:
- Constant Field Values
-
LESS_THAN_EQUALS
public static final java.lang.String LESS_THAN_EQUALS
ConstantLESS_THAN_EQUALS="<="
- See Also:
- Constant Field Values
-
GREATER_THAN_EQUALS
public static final java.lang.String GREATER_THAN_EQUALS
ConstantGREATER_THAN_EQUALS=">="
- See Also:
- Constant Field Values
-
EQUALS
public static final java.lang.String EQUALS
ConstantEQUALS="="
- See Also:
- Constant Field Values
-
NOT_EQUAL
public static final java.lang.String NOT_EQUAL
ConstantNOT_EQUAL="!="
- See Also:
- Constant Field Values
-
MATCHES
public static final java.lang.String MATCHES
ConstantMATCHES="~"
- See Also:
- Constant Field Values
-
hex
protected boolean hex
-
-
Method Detail
-
getRuntimeAttributes
public java.util.Map<java.lang.String,java.lang.Object> getRuntimeAttributes(MonitoredService svc, java.util.Map<java.lang.String,java.lang.Object> parameters)
- Specified by:
getRuntimeAttributes
in interfaceServiceMonitor
- Overrides:
getRuntimeAttributes
in classAbstractServiceMonitor
- Parameters:
svc
- Includes details about to the service being monitored.parameters
- Includes the service parameters defined in poller-configuration.xml and those returned byServiceMonitor.getRuntimeAttributes(MonitoredService, Map)
.- Returns:
- Additional attributes, which should be added to the parameter map before calling
ServiceMonitor.poll(MonitoredService, Map)
.
-
getAgentConfig
public SnmpAgentConfig getAgentConfig(MonitoredService svc, java.util.Map<java.lang.String,java.lang.Object> parameters)
-
getStringValue
public java.lang.String getStringValue(SnmpValue result)
-
meetsCriteria
public boolean meetsCriteria(SnmpValue 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 configuration file.- Parameters:
result
- aSnmpValue
object.operator
- aString
object.operand
- aString
object.- Returns:
- a boolean.
-
-