OpenNMS API 1.2.3

org.opennms.netmgt.config
Interface PollerConfig

All Known Implementing Classes:
MockPollerConfig, PollerConfigFactory

public interface PollerConfig

Author:
brozow TODO To change the template for this generated type comment go to Window - Preferences - Java - Code Style - Code Templates

Method Summary
 java.util.Enumeration enumeratePackage()
           
 java.lang.String getCriticalService()
          This method returns the configured critical service name.
 Package getFirstPackageMatch(java.lang.String ipaddr)
          Returns the first package that the ip belongs to, null if none.
 java.lang.String getNextOutageIdSql()
           
 Package getPackage(java.lang.String pkgName)
           
 java.util.List getRRAList(Package pkg)
          Retrieves configured list of RoundRobin Archive statements.
 ServiceMonitor getServiceMonitor(java.lang.String svcName)
           
 java.util.Map getServiceMonitors()
           
 int getStep(Package pkg)
          Retrieves configured RRD step size.
 int getThreads()
           
 boolean getXmlrpc()
          This method returns the boolean flag xmlrpc to indicate if notification to external xmlrpc server is needed.
 boolean interfaceInPackage(java.lang.String iface, Package pkg)
          This method is used to determine if the named interface is included in the passed package definition.
 boolean isPolled(java.lang.String ipaddr)
          Returns true if the ip is part of atleast one package.
 boolean isPolled(java.lang.String svcName, Package pkg)
          Returns true if this package has the service enabled and if there is a monitor for this service.
 boolean isPolled(java.lang.String ipaddr, java.lang.String svcName)
          Returns true if the ip is part of atleast one package and if this package has the service enabled and if there is a monitor for this service.
 boolean nodeOutageProcessingEnabled()
          Returns true if node outage processing is enabled.
 boolean pollAllIfNoCriticalServiceDefined()
          This method returns the configured value of the 'pollAllIfNoCriticalServiceDefined' flag.
 void rebuildPackageIpListMap()
          This method is used to rebuild the package agaist iplist mapping when needed.
 boolean serviceInPackageAndEnabled(java.lang.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(java.lang.String svcName)
          Returns true if the service has a monitor configured, false otherwise.
 boolean serviceUnresponsiveEnabled()
          Returns true if serviceUnresponsive behavior is enabled.
 void update()
           
 

Method Detail

getXmlrpc

public 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

public java.lang.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

public 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

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


serviceUnresponsiveEnabled

public 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.


rebuildPackageIpListMap

public void rebuildPackageIpListMap()
This method is used to rebuild the package agaist iplist 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 iplist should be rebuilt so that poller could know which package this ip/service pair is in.


interfaceInPackage

public boolean interfaceInPackage(java.lang.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

public boolean serviceInPackageAndEnabled(java.lang.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.

serviceMonitored

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

Parameters:
svcName - The service name to lookup.

getFirstPackageMatch

public Package getFirstPackageMatch(java.lang.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 alrady in the database.

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

isPolled

public boolean isPolled(java.lang.String ipaddr)
Returns true if the ip is part of atleast one package. Note: Evaluation of the interface against a package filter will only work if the IP is alrady in the database.

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

isPolled

public boolean isPolled(java.lang.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 alrady in the database.

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

isPolled

public boolean isPolled(java.lang.String ipaddr,
                        java.lang.String svcName)
Returns true if the ip is part of atleast 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 alrady in the database.

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

getStep

public 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

public java.util.List getRRAList(Package pkg)
Retrieves configured list of RoundRobin Archive statements.

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

getNextOutageIdSql

public java.lang.String getNextOutageIdSql()

enumeratePackage

public java.util.Enumeration enumeratePackage()

getPackage

public Package getPackage(java.lang.String pkgName)

getThreads

public int getThreads()

getServiceMonitors

public java.util.Map getServiceMonitors()

getServiceMonitor

public ServiceMonitor getServiceMonitor(java.lang.String svcName)

update

public void update()
            throws java.lang.Exception
Throws:
java.lang.Exception

OpenNMS API 1.2.3

Generated by eevans on May 29 2005 2015.