org.opennms.netmgt.config
Interface PollerConfig

All Known Implementing Classes:
PollerConfigFactory, PollerConfigManager

public interface PollerConfig

PollerConfig interface.

Version:
$Id: $
Author:
Mathew Brozowski TODO To change the template for this generated type comment go to Window - Preferences - Java - Code Style - Code Templates

Method Summary
 void addMonitor(String svcName, String className)
          addMonitor
 void addPackage(Package pkg)
          addPackage
 Enumeration<Package> enumeratePackage()
          enumeratePackage
 List<String> getAllPackageMatches(String ipAddr)
          getAllPackageMatches
 PollerConfiguration getConfiguration()
          getConfiguration
 String getCriticalService()
          This method returns the configured critical service name.
 Package getFirstLocalPackageMatch(String ipaddr)
          Returns the first package that the ip belongs to that is not marked as remote, null if none.
 Package getFirstPackageMatch(String ipaddr)
          Returns the first package that the ip belongs to, null if none.
 List<String> getIpList(Package pkg)
          Determine the list of IPs the filter rule for this package allows
 String getNextOutageIdSql()
          getNextOutageIdSql
 Package getPackage(String pkgName)
          getPackage
 List<String> getRRAList(Package pkg)
          Retrieves configured list of RoundRobin Archive statements.
 Service getServiceInPackage(String svcName, Package pkg)
          Return the Service object with the given name from the give Package.
 ServiceMonitor getServiceMonitor(String svcName)
          getServiceMonitor
 Collection<ServiceMonitorLocator> getServiceMonitorLocators(DistributionContext context)
          getServiceMonitorLocators
 Map<String,ServiceMonitor> getServiceMonitors()
          getServiceMonitors
 ServiceSelector getServiceSelectorForPackage(Package pkg)
          getServiceSelectorForPackage
 int getStep(Package pkg)
          Retrieves configured RRD step size.
 int getThreads()
          getThreads
 boolean getXmlrpc()
          This method returns the boolean flag xmlrpc to indicate if notification to external xmlrpc server is needed.
 boolean interfaceInPackage(String iface, Package pkg)
          This method is used to determine if the named interface is included in the passed package definition.
 boolean isPolled(String ipaddr)
          Returns true if the ip is part of at least one package.
 boolean isPolled(String svcName, Package pkg)
          Returns true if this package has the service enabled and if there is a monitor for this service.
 boolean isPolled(String ipaddr, String svcName)
          Returns true if the ip is part of at least one package and if this package has the service enabled and if there is a monitor for this service.
 boolean isPolledLocally(String ipaddr)
          Returns true if the ip is part of at least one package that is NOT marked as remote Note: Evaluation of the interface against a package filter will only work if the IP is already in the database.
 boolean isPolledLocally(String ipaddr, String svcName)
          Returns true if the ip is part of at least one package and if this package has the service enabled and if there is a monitor for this service and the package is NOT marked as remote Note: Evaluation of the interface against a package filter will only work if the IP is already in the database.
 boolean nodeOutageProcessingEnabled()
          Returns true if node outage processing is enabled.
 boolean pathOutageEnabled()
          Returns true if the path outage feature is enabled.
 boolean pollAllIfNoCriticalServiceDefined()
          This method returns the configured value of the 'pollAllIfNoCriticalServiceDefined' flag.
 void rebuildPackageIpListMap()
          This method is used to rebuild the package against ip list mapping when needed.
 void releaseAllServiceMonitors()
          releaseAllServiceMonitors
 void save()
          save
 void saveResponseTimeData(String locationMonitor, OnmsMonitoredService monSvc, double responseTime, Package pkg)
          saveResponseTimeData
 boolean serviceInPackageAndEnabled(String svcName, Package pkg)
          Returns true if the service is part of the package and the status of the service is set to "on".
 boolean serviceMonitored(String svcName)
          Returns true if the service has a monitor configured, false otherwise.
 boolean serviceUnresponsiveEnabled()
          Returns true if serviceUnresponsive behavior is enabled.
 void update()
          update
 

Method Detail

getXmlrpc

boolean getXmlrpc()
This method returns the boolean flag xmlrpc to indicate if notification to external xmlrpc server is needed.

Returns:
true if need to notify an external xmlrpc server

getCriticalService

String getCriticalService()
This method returns the configured critical service name.

Returns:
the name of the configured critical service, or null if none is present

pollAllIfNoCriticalServiceDefined

boolean pollAllIfNoCriticalServiceDefined()
This method returns the configured value of the 'pollAllIfNoCriticalServiceDefined' flag. A value of true causes the poller's node outage code to poll all the services on an interface if a status change has occurred and there is no critical service defined on the interface. A value of false causes the poller's node outage code to not poll all the services on an interface in this situation.

Returns:
true or false based on configured value

nodeOutageProcessingEnabled

boolean nodeOutageProcessingEnabled()
Returns true if node outage processing is enabled.

Returns:
a boolean.

serviceUnresponsiveEnabled

boolean serviceUnresponsiveEnabled()
Returns true if serviceUnresponsive behavior is enabled. If enabled a serviceUnresponsive event is generated for TCP-based services if the service monitor is able to connect to the designated port but times out before receiving the expected response. If disabled, an outage will be generated in this scenario.

Returns:
a boolean.

pathOutageEnabled

boolean pathOutageEnabled()
Returns true if the path outage feature is enabled. If enabled, the code looks for a critical path specification when processing nodeDown events. If a critical path exists for the node, it will be tested. If the critical path fails to respond, the eventReason parameter on the nodeDown event is set to "pathOutage". This parameter will be used by notifd to suppress nodeDown notification.

Returns:
a boolean.

rebuildPackageIpListMap

void rebuildPackageIpListMap()
This method is used to rebuild the package against ip list mapping when needed. When a node gained service event occurs, poller has to determine which package the ip/service combination is in, but if the interface is a newly added one, the package ip list should be rebuilt so that poller could know which package this ip/service pair is in.


getIpList

List<String> getIpList(Package pkg)
Determine the list of IPs the filter rule for this package allows

Parameters:
pkg - a Package object.
Returns:
a List object.

interfaceInPackage

boolean interfaceInPackage(String iface,
                           Package pkg)
This method is used to determine if the named interface is included in the passed package definition. If the interface belongs to the package then a value of true is returned. If the interface does not belong to the package a false value is returned. Note: Evaluation of the interface against a package filter will only work if the IP is already in the database.

Parameters:
iface - The interface to test against the package.
pkg - The package to check for the inclusion of the interface.
Returns:
True if the interface is included in the package, false otherwise.

serviceInPackageAndEnabled

boolean serviceInPackageAndEnabled(String svcName,
                                   Package pkg)
Returns true if the service is part of the package and the status of the service is set to "on". Returns false if the service is not in the package or it is but the status of the service is set to "off".

Parameters:
svcName - The service name to lookup.
pkg - The package to lookup up service.
Returns:
a boolean.

getServiceInPackage

Service getServiceInPackage(String svcName,
                            Package pkg)
Return the Service object with the given name from the give Package.

Parameters:
svcName - the service name to lookup
pkg - the packe to lookup the the service in
Returns:
the Service object from the package with the give name, null if its not in the pkg

serviceMonitored

boolean serviceMonitored(String svcName)
Returns true if the service has a monitor configured, false otherwise.

Parameters:
svcName - The service name to lookup.
Returns:
a boolean.

getFirstPackageMatch

Package getFirstPackageMatch(String ipaddr)
Returns the first package that the ip belongs to, null if none. Note: Evaluation of the interface against a package filter will only work if the IP is already in the database.

Parameters:
ipaddr - the interface to check
Returns:
the first package that the ip belongs to, null if none

getFirstLocalPackageMatch

Package getFirstLocalPackageMatch(String ipaddr)
Returns the first package that the ip belongs to that is not marked as remote, null if none. Note: Evaluation of the interface against a package filter will only work if the IP is already in the database.

Parameters:
ipaddr - the interface to check
Returns:
the first package that the ip belongs to, null if none

isPolled

boolean isPolled(String ipaddr)
Returns true if the ip is part of at least one package. Note: Evaluation of the interface against a package filter will only work if the IP is already in the database.

Parameters:
ipaddr - the interface to check
Returns:
true if the ip is part of at least one package, false otherwise

isPolledLocally

boolean isPolledLocally(String ipaddr)
Returns true if the ip is part of at least one package that is NOT marked as remote Note: Evaluation of the interface against a package filter will only work if the IP is already in the database.

Parameters:
ipaddr - the interface to check
Returns:
true if the ip is part of at least one package, false otherwise

isPolled

boolean isPolled(String svcName,
                 Package pkg)
Returns true if this package has the service enabled and if there is a monitor for this service. Note: Evaluation of the interface against a package filter will only work if the IP is already in the database.

Parameters:
svcName - the service to check
pkg - the package to check
Returns:
true if the ip is part of at least one package and the service is enabled in this package and monitored, false otherwise

isPolled

boolean isPolled(String ipaddr,
                 String svcName)
Returns true if the ip is part of at least one package and if this package has the service enabled and if there is a monitor for this service. Note: Evaluation of the interface against a package filter will only work if the IP is already in the database.

Parameters:
ipaddr - the interface to check
svcName - the service to check
Returns:
true if the ip is part of at least one package and the service is enabled in this package and monitored, false otherwise

isPolledLocally

boolean isPolledLocally(String ipaddr,
                        String svcName)
Returns true if the ip is part of at least one package and if this package has the service enabled and if there is a monitor for this service and the package is NOT marked as remote Note: Evaluation of the interface against a package filter will only work if the IP is already in the database.

Parameters:
ipaddr - the interface to check
svcName - the service to check
Returns:
true if the ip is part of at least one package and the service is enabled in this package and monitored, false otherwise

getStep

int getStep(Package pkg)
Retrieves configured RRD step size.

Parameters:
pkg - Name of the data collection
Returns:
RRD step size for the specified collection

getRRAList

List<String> getRRAList(Package pkg)
Retrieves configured list of RoundRobin Archive statements.

Parameters:
pkg - Name of the data collection
Returns:
list of RRA strings.

getAllPackageMatches

List<String> getAllPackageMatches(String ipAddr)

getAllPackageMatches

Parameters:
ipAddr - a String object.
Returns:
a List object.

getNextOutageIdSql

String getNextOutageIdSql()

getNextOutageIdSql

Returns:
a String object.

enumeratePackage

Enumeration<Package> enumeratePackage()

enumeratePackage

Returns:
a Enumeration object.

getPackage

Package getPackage(String pkgName)

getPackage

Parameters:
pkgName - a String object.
Returns:
a Package object.

getServiceSelectorForPackage

ServiceSelector getServiceSelectorForPackage(Package pkg)

getServiceSelectorForPackage

Parameters:
pkg - a Package object.
Returns:
a ServiceSelector object.

getThreads

int getThreads()

getThreads

Returns:
a int.

getServiceMonitors

Map<String,ServiceMonitor> getServiceMonitors()

getServiceMonitors

Returns:
a Map object.

releaseAllServiceMonitors

void releaseAllServiceMonitors()

releaseAllServiceMonitors


getServiceMonitor

ServiceMonitor getServiceMonitor(String svcName)

getServiceMonitor

Parameters:
svcName - a String object.
Returns:
a ServiceMonitor object.

update

void update()
            throws IOException,
                   org.exolab.castor.xml.MarshalException,
                   org.exolab.castor.xml.ValidationException

update

Throws:
IOException - if any.
org.exolab.castor.xml.MarshalException - if any.
org.exolab.castor.xml.ValidationException - if any.

save

void save()
          throws org.exolab.castor.xml.MarshalException,
                 IOException,
                 org.exolab.castor.xml.ValidationException

save

Throws:
org.exolab.castor.xml.MarshalException - if any.
IOException - if any.
org.exolab.castor.xml.ValidationException - if any.

addPackage

void addPackage(Package pkg)

addPackage

Parameters:
pkg - a Package object.

addMonitor

void addMonitor(String svcName,
                String className)

addMonitor

Parameters:
svcName - a String object.
className - a String object.

getConfiguration

PollerConfiguration getConfiguration()

getConfiguration

Returns:
a PollerConfiguration object.

saveResponseTimeData

void saveResponseTimeData(String locationMonitor,
                          OnmsMonitoredService monSvc,
                          double responseTime,
                          Package pkg)

saveResponseTimeData

Parameters:
locationMonitor - a String object.
monSvc - a OnmsMonitoredService object.
responseTime - a double.
pkg - a Package object.

getServiceMonitorLocators

Collection<ServiceMonitorLocator> getServiceMonitorLocators(DistributionContext context)

getServiceMonitorLocators

Parameters:
context - a DistributionContext object.
Returns:
a Collection object.


Copyright © 2011. All Rights Reserved.