public abstract class PollerConfigManager extends Object implements PollerConfig
Abstract PollerConfigManager class.
| Modifier and Type | Field and Description |
|---|---|
protected PollerConfiguration |
m_config
The config class loaded from the config file
|
| Constructor and Description |
|---|
PollerConfigManager(InputStream stream,
String localServer,
boolean verifyServer)
Constructor for PollerConfigManager.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addMonitor(String svcName,
String className)
addMonitor
|
void |
addPackage(Package pkg)
addPackage
|
Enumeration<Package> |
enumeratePackage()
enumeratePackage
|
List<String> |
getAllPackageMatches(String ipaddr)
getAllPackageMatches
|
PollerConfiguration |
getConfiguration()
Return the poller configuration object.
|
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<InetAddress> |
getIpList(Package pkg)
Determine the list of IPs the filter rule for this package allows
|
String |
getNextOutageIdSql()
getNextOutageIdSql
|
Package |
getPackage(String name)
getPackage
|
Lock |
getReadLock()
getReadLock
|
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
|
ServiceMonitorRegistry |
getServiceMonitorRegistry() |
Map<String,ServiceMonitor> |
getServiceMonitors()
getServiceMonitors
|
ServiceSelector |
getServiceSelectorForPackage(Package pkg)
getServiceSelectorForPackage
|
int |
getStep(Package pkg)
Retrieves configured RRD step size.
|
int |
getThreads()
getThreads
|
Lock |
getWriteLock()
getWriteLock
|
boolean |
isInterfaceInPackage(String iface,
Package pkg)
This method is used to determine if the named interface is included in
the passed package definition.
|
boolean |
isNodeOutageProcessingEnabled()
Returns true if node outage processing is enabled.
|
boolean |
isPathOutageEnabled()
This method returns the boolean flag pathOutageEnabled to indicate if
path outage processing on nodeDown events is enabled
|
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 atleast 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 |
isServiceInPackageAndEnabled(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 |
isServiceMonitored(String svcName)
Returns true if the service has a monitor configured, false otherwise.
|
boolean |
isServiceUnresponsiveEnabled()
Returns true if serviceUnresponsive behavior is enabled.
|
Iterable<Parameter> |
parameters(Service svc)
parameters
|
void |
rebuildPackageIpListMap()
This method is used to rebuild the package agaist iplist mapping when
needed.
|
void |
save()
Saves the current in-memory configuration to disk and reloads
|
protected abstract void |
saveXml(String xml)
saveXml
|
protected void |
setUpInternalData()
setUpInternalData
|
boolean |
shouldPollAllIfNoCriticalServiceDefined()
This method returns the configured value of the
'pollAllIfNoCriticalServiceDefined' flag.
|
abstract void |
update()
update
|
protected PollerConfiguration m_config
public PollerConfigManager(InputStream stream, String localServer, boolean verifyServer)
Constructor for PollerConfigManager.
stream - a InputStream object.localServer - a String object.verifyServer - a boolean.public Lock getReadLock()
PollerConfiggetReadLock
getReadLock in interface PollerConfigpublic Lock getWriteLock()
PollerConfiggetWriteLock
getWriteLock in interface PollerConfigprotected void setUpInternalData()
setUpInternalData
public abstract void update()
throws IOException
update
update in interface PollerConfigIOException - if any.protected abstract void saveXml(String xml) throws IOException
saveXml
xml - a String object.IOException - if any.public void save()
throws IOException
save in interface PollerConfigIOException - if any.public PollerConfiguration getConfiguration()
getConfiguration in interface PollerConfigPollerConfiguration object.public Package getPackage(String name)
getPackage
getPackage in interface PollerConfigname - a String object.Package object.public ServiceSelector getServiceSelectorForPackage(Package pkg)
getServiceSelectorForPackage
getServiceSelectorForPackage in interface PollerConfigpkg - a Package object.ServiceSelector object.public void addPackage(Package pkg)
addPackage
addPackage in interface PollerConfigpkg - a Package object.public void addMonitor(String svcName, String className)
addMonitor
addMonitor in interface PollerConfigsvcName - a String object.className - a String object.public boolean isPathOutageEnabled()
isPathOutageEnabled in interface PollerConfigpublic String getCriticalService()
getCriticalService in interface PollerConfigpublic boolean shouldPollAllIfNoCriticalServiceDefined()
shouldPollAllIfNoCriticalServiceDefined in interface PollerConfigpublic boolean isNodeOutageProcessingEnabled()
isNodeOutageProcessingEnabled in interface PollerConfigpublic boolean isServiceUnresponsiveEnabled()
isServiceUnresponsiveEnabled in interface PollerConfigpublic List<InetAddress> getIpList(Package pkg)
getIpList in interface PollerConfigpkg - a Package object.List object.public void rebuildPackageIpListMap()
rebuildPackageIpListMap in interface PollerConfigpublic boolean isInterfaceInPackage(String iface, Package pkg)
isInterfaceInPackage in interface PollerConfigiface - The interface to test against the package.pkg - The package to check for the inclusion of the interface.public boolean isServiceInPackageAndEnabled(String svcName, Package pkg)
isServiceInPackageAndEnabled in interface PollerConfigsvcName - The service name to lookup.pkg - The package to lookup up service.public Service getServiceInPackage(String svcName, Package pkg)
getServiceInPackage in interface PollerConfigsvcName - the service name to lookuppkg - the packe to lookup the the service inpublic boolean isServiceMonitored(String svcName)
isServiceMonitored in interface PollerConfigsvcName - The service name to lookup.public Package getFirstPackageMatch(String ipaddr)
getFirstPackageMatch in interface PollerConfigipaddr - the interface to checkpublic Package getFirstLocalPackageMatch(String ipaddr)
getFirstLocalPackageMatch in interface PollerConfigipaddr - the interface to checkpublic List<String> getAllPackageMatches(String ipaddr)
getAllPackageMatches
Returns a list of package names 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.getAllPackageMatches in interface PollerConfigipaddr - a String object.List object.public boolean isPolled(String ipaddr)
isPolled in interface PollerConfigipaddr - the interface to checkpublic boolean isPolledLocally(String ipaddr)
isPolledLocally in interface PollerConfigipaddr - the interface to checkpublic boolean isPolled(String svcName, Package pkg)
isPolled in interface PollerConfigsvcName - the service to checkpkg - the package to checkpublic boolean isPolled(String ipaddr, String svcName)
isPolled in interface PollerConfigipaddr - the interface to checksvcName - the service to checkpublic boolean isPolledLocally(String ipaddr, String svcName)
isPolledLocally in interface PollerConfigipaddr - the interface to checksvcName - the service to checkpublic int getStep(Package pkg)
getStep in interface PollerConfigpkg - Name of the data collectionpublic List<String> getRRAList(Package pkg)
getRRAList in interface PollerConfigpkg - Name of the data collectionpublic Enumeration<Package> enumeratePackage()
enumeratePackage
enumeratePackage in interface PollerConfigEnumeration object.public Iterable<Parameter> parameters(Service svc)
parameters
parameters in interface PollerConfigsvc - a Service object.Iterable object.public int getThreads()
getThreads
getThreads in interface PollerConfigpublic Map<String,ServiceMonitor> getServiceMonitors()
getServiceMonitors
getServiceMonitors in interface PollerConfigMap object.public ServiceMonitor getServiceMonitor(String svcName)
getServiceMonitor
getServiceMonitor in interface PollerConfigsvcName - a String object.ServiceMonitor object.public Collection<ServiceMonitorLocator> getServiceMonitorLocators(DistributionContext context)
getServiceMonitorLocators
getServiceMonitorLocators in interface PollerConfigcontext - a DistributionContext object.Collection object.public ServiceMonitorRegistry getServiceMonitorRegistry()
getServiceMonitorRegistry in interface PollerConfigpublic String getNextOutageIdSql()
getNextOutageIdSql
getNextOutageIdSql in interface PollerConfigString object.Copyright © 2017. All rights reserved.