|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.opennms.netmgt.config.PollerConfigManager
public abstract class PollerConfigManager
| Constructor Summary | |
|---|---|
PollerConfigManager(Reader reader,
String localServer,
boolean verifyServer)
|
|
| Method Summary | |
|---|---|
void |
addMonitor(String svcName,
String className)
|
void |
addPackage(Package pkg)
|
Enumeration<Monitor> |
enumerateMonitor()
|
Enumeration<Package> |
enumeratePackage()
|
List<String> |
getAllPackageMatches(String ipaddr)
Returns a list of package names that the ip belongs to, null if none. |
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<String> |
getIpList(Package pkg)
Determine the list of IPs the filter rule for this package allows |
String |
getNextOutageIdSql()
|
Package |
getPackage(String name)
|
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)
|
Collection<ServiceMonitorLocator> |
getServiceMonitorLocators(DistributionContext context)
|
Map<String,ServiceMonitor> |
getServiceMonitors()
|
ServiceSelector |
getServiceSelectorForPackage(Package pkg)
|
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. |
Iterable<String> |
includeURLs(Package pkg)
|
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 atleast 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. |
Iterable<Monitor> |
monitors()
|
boolean |
nodeOutageProcessingEnabled()
Returns true if node outage processing is enabled. |
Iterable<Package> |
packages()
|
Iterable<Parameter> |
parameters(Service svc)
|
boolean |
pathOutageEnabled()
This method returns the boolean flag pathOutageEnabled to indicate if path outage processing on nodeDown events 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. |
void |
releaseAllServiceMonitors()
|
protected void |
reloadXML(Reader reader)
|
void |
save()
Saves the current in-memory configuration to disk and reloads |
void |
saveResponseTimeData(String locationMonitor,
OnmsMonitoredService monSvc,
double responseTime,
Package pkg)
|
protected abstract void |
saveXml(String xml)
|
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. |
Iterable<Service> |
services(Package pkg)
|
boolean |
serviceUnresponsiveEnabled()
Returns true if serviceUnresponsive behavior is enabled. |
abstract void |
update()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public PollerConfigManager(Reader reader,
String localServer,
boolean verifyServer)
throws org.exolab.castor.xml.MarshalException,
org.exolab.castor.xml.ValidationException,
IOException
reader - localServer - verifyServer -
org.exolab.castor.xml.MarshalException
org.exolab.castor.xml.ValidationException
IOException| Method Detail |
|---|
public abstract void update()
throws IOException,
org.exolab.castor.xml.MarshalException,
org.exolab.castor.xml.ValidationException
update in interface PollerConfigIOException
org.exolab.castor.xml.MarshalException
org.exolab.castor.xml.ValidationException
protected abstract void saveXml(String xml)
throws IOException
IOException
protected void reloadXML(Reader reader)
throws org.exolab.castor.xml.MarshalException,
org.exolab.castor.xml.ValidationException,
IOException
org.exolab.castor.xml.MarshalException
org.exolab.castor.xml.ValidationException
IOException
public void save()
throws org.exolab.castor.xml.MarshalException,
IOException,
org.exolab.castor.xml.ValidationException
save in interface PollerConfigorg.exolab.castor.xml.MarshalException
IOException
org.exolab.castor.xml.ValidationExceptionpublic PollerConfiguration getConfiguration()
getConfiguration in interface PollerConfigpublic Package getPackage(String name)
getPackage in interface PollerConfigpublic ServiceSelector getServiceSelectorForPackage(Package pkg)
getServiceSelectorForPackage in interface PollerConfigpublic void addPackage(Package pkg)
addPackage in interface PollerConfig
public void addMonitor(String svcName,
String className)
addMonitor in interface PollerConfigpublic boolean getXmlrpc()
getXmlrpc in interface PollerConfigpublic boolean pathOutageEnabled()
pathOutageEnabled in interface PollerConfigpublic String getCriticalService()
getCriticalService in interface PollerConfigpublic boolean pollAllIfNoCriticalServiceDefined()
pollAllIfNoCriticalServiceDefined in interface PollerConfigpublic boolean nodeOutageProcessingEnabled()
nodeOutageProcessingEnabled in interface PollerConfigpublic boolean serviceUnresponsiveEnabled()
serviceUnresponsiveEnabled in interface PollerConfigpublic List<String> getIpList(Package pkg)
PollerConfig
getIpList in interface PollerConfigpublic void rebuildPackageIpListMap()
rebuildPackageIpListMap in interface PollerConfig
public boolean interfaceInPackage(String iface,
Package pkg)
interfaceInPackage in interface PollerConfigiface - The interface to test against the package.pkg - The package to check for the inclusion of the interface.
public boolean serviceInPackageAndEnabled(String svcName,
Package pkg)
serviceInPackageAndEnabled 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 in
public boolean serviceMonitored(String svcName)
serviceMonitored in interface PollerConfigsvcName - The service name to lookup.public Package getFirstPackageMatch(String ipaddr)
getFirstPackageMatch in interface PollerConfigipaddr - the interface to check
public Package getFirstLocalPackageMatch(String ipaddr)
PollerConfig
getFirstLocalPackageMatch in interface PollerConfigipaddr - the interface to check
public List<String> getAllPackageMatches(String ipaddr)
getAllPackageMatches in interface PollerConfigipaddr - the interface to check
public boolean isPolled(String ipaddr)
isPolled in interface PollerConfigipaddr - the interface to check
public boolean isPolledLocally(String ipaddr)
PollerConfig
isPolledLocally in interface PollerConfigipaddr - the interface to check
public boolean isPolled(String svcName,
Package pkg)
isPolled in interface PollerConfigsvcName - the service to checkpkg - the package to check
public boolean isPolled(String ipaddr,
String svcName)
isPolled in interface PollerConfigipaddr - the interface to checksvcName - the service to check
public boolean isPolledLocally(String ipaddr,
String svcName)
PollerConfig
isPolledLocally in interface PollerConfigipaddr - the interface to checksvcName - the service to check
public int getStep(Package pkg)
getStep in interface PollerConfigpkg - Name of the data collection
public List<String> getRRAList(Package pkg)
getRRAList in interface PollerConfigpkg - Name of the data collection
public Enumeration<Package> enumeratePackage()
enumeratePackage in interface PollerConfigpublic Enumeration<Monitor> enumerateMonitor()
public Iterable<Service> services(Package pkg)
public Iterable<String> includeURLs(Package pkg)
public Iterable<Parameter> parameters(Service svc)
public Iterable<Package> packages()
public Iterable<Monitor> monitors()
public int getThreads()
getThreads in interface PollerConfigpublic Map<String,ServiceMonitor> getServiceMonitors()
getServiceMonitors in interface PollerConfigpublic ServiceMonitor getServiceMonitor(String svcName)
getServiceMonitor in interface PollerConfigpublic Collection<ServiceMonitorLocator> getServiceMonitorLocators(DistributionContext context)
getServiceMonitorLocators in interface PollerConfigpublic String getNextOutageIdSql()
getNextOutageIdSql in interface PollerConfigpublic void releaseAllServiceMonitors()
releaseAllServiceMonitors in interface PollerConfig
public void saveResponseTimeData(String locationMonitor,
OnmsMonitoredService monSvc,
double responseTime,
Package pkg)
saveResponseTimeData in interface PollerConfig
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||