Class DNSResolutionMonitor
- java.lang.Object
-
- org.opennms.netmgt.poller.support.AbstractServiceMonitor
-
- org.opennms.netmgt.poller.monitors.support.ParameterSubstitutingMonitor
-
- org.opennms.netmgt.poller.monitors.DNSResolutionMonitor
-
- All Implemented Interfaces:
ServiceMonitor
public class DNSResolutionMonitor extends ParameterSubstitutingMonitor
DNSResolutionMonitor- Author:
- brozow, fooker, schlazor
-
-
Field Summary
Fields Modifier and Type Field Description static org.slf4j.Logger
LOG
static String
PARM_LOOKUP
static String
PARM_NAMESERVER
static String
PARM_RECORD_TYPE_A
static String
PARM_RECORD_TYPE_AAAA
static String
PARM_RECORD_TYPE_CNAME
static String
PARM_RECORD_TYPE_MX
static String
PARM_RECORD_TYPE_NS
static String
PARM_RECORD_TYPE_PTR
static String
PARM_RECORD_TYPE_SOA
static String
PARM_RECORD_TYPE_SRV
static String
PARM_RECORD_TYPE_TXT
static String
PARM_RECORD_TYPES
static String
PARM_RESOLUTION_TYPE
static String
PARM_RESOLUTION_TYPE_BOTH
static String
PARM_RESOLUTION_TYPE_DEFAULT
static String
PARM_RESOLUTION_TYPE_EITHER
static String
PARM_RESOLUTION_TYPE_V4
static String
PARM_RESOLUTION_TYPE_V6
-
Constructor Summary
Constructors Constructor Description DNSResolutionMonitor()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description PollStatus
poll(MonitoredService svc, Map<String,Object> parameters)
This method is the heart of the plug-in monitor.-
Methods inherited from class org.opennms.netmgt.poller.monitors.support.ParameterSubstitutingMonitor
getRuntimeAttributes, getSubstitutedParameters, parseString, resolveKeyedString
-
Methods inherited from class org.opennms.netmgt.poller.support.AbstractServiceMonitor
getEffectiveLocation, getKeyedBoolean, getKeyedInstance, getKeyedInteger, getKeyedLong, getKeyedObject, getKeyedString, getServiceProperties
-
-
-
-
Field Detail
-
LOG
public static final org.slf4j.Logger LOG
-
PARM_RESOLUTION_TYPE
public static final String PARM_RESOLUTION_TYPE
- See Also:
- Constant Field Values
-
PARM_RESOLUTION_TYPE_V4
public static final String PARM_RESOLUTION_TYPE_V4
- See Also:
- Constant Field Values
-
PARM_RESOLUTION_TYPE_V6
public static final String PARM_RESOLUTION_TYPE_V6
- See Also:
- Constant Field Values
-
PARM_RESOLUTION_TYPE_BOTH
public static final String PARM_RESOLUTION_TYPE_BOTH
- See Also:
- Constant Field Values
-
PARM_RESOLUTION_TYPE_EITHER
public static final String PARM_RESOLUTION_TYPE_EITHER
- See Also:
- Constant Field Values
-
PARM_RESOLUTION_TYPE_DEFAULT
public static final String PARM_RESOLUTION_TYPE_DEFAULT
- See Also:
- Constant Field Values
-
PARM_RECORD_TYPES
public static final String PARM_RECORD_TYPES
- See Also:
- Constant Field Values
-
PARM_RECORD_TYPE_A
public static final String PARM_RECORD_TYPE_A
- See Also:
- Constant Field Values
-
PARM_RECORD_TYPE_AAAA
public static final String PARM_RECORD_TYPE_AAAA
- See Also:
- Constant Field Values
-
PARM_RECORD_TYPE_CNAME
public static final String PARM_RECORD_TYPE_CNAME
- See Also:
- Constant Field Values
-
PARM_RECORD_TYPE_NS
public static final String PARM_RECORD_TYPE_NS
- See Also:
- Constant Field Values
-
PARM_RECORD_TYPE_MX
public static final String PARM_RECORD_TYPE_MX
- See Also:
- Constant Field Values
-
PARM_RECORD_TYPE_PTR
public static final String PARM_RECORD_TYPE_PTR
- See Also:
- Constant Field Values
-
PARM_RECORD_TYPE_SOA
public static final String PARM_RECORD_TYPE_SOA
- See Also:
- Constant Field Values
-
PARM_RECORD_TYPE_SRV
public static final String PARM_RECORD_TYPE_SRV
- See Also:
- Constant Field Values
-
PARM_RECORD_TYPE_TXT
public static final String PARM_RECORD_TYPE_TXT
- See Also:
- Constant Field Values
-
PARM_NAMESERVER
public static final String PARM_NAMESERVER
- See Also:
- Constant Field Values
-
PARM_LOOKUP
public static final String PARM_LOOKUP
- See Also:
- Constant Field Values
-
-
Method Detail
-
poll
public PollStatus poll(MonitoredService svc, Map<String,Object> parameters)
Description copied from interface:ServiceMonitor
This method is the heart of the plug-in monitor. Each time an interface requires a check to be performed as defined by the scheduler the poll method is invoked. The poll is passed the service to check.
By default when the status transition from up to down or vice versa the framework will generate an event. Additionally, if the polling interval changes due to an extended unavailability, the framework will generate an additional down event. The plug-in can suppress the generation of the default events by setting the suppress event bit in the returned integer.
NOTE: This method may be invoked on a Minion, in which case certain bean and facilities will not be available. If any state related information is required such as agent related configuration, it should retrieved by the
ServiceMonitor.getRuntimeAttributes(MonitoredService, Map)
.- 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:
- The availability of the interface and if a transition event should be suppressed.
- See Also:
PollStatus.SERVICE_AVAILABLE
,PollStatus.SERVICE_UNAVAILABLE
,PollStatus.SERVICE_AVAILABLE
,PollStatus.SERVICE_UNAVAILABLE
-
-