|
||||||||||
| 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
Abstract PollerConfigManager class.
| Field Summary | |
|---|---|
protected PollerConfiguration |
m_config
The config class loaded from the config file |
| Constructor Summary | |
|---|---|
PollerConfigManager(InputStream stream,
String localServer,
boolean verifyServer)
Constructor for PollerConfigManager. |
|
PollerConfigManager(Reader reader,
String localServer,
boolean verifyServer)
Constructor for PollerConfigManager. |
|
| Method Summary | |
|---|---|
void |
addMonitor(String svcName,
String className)
addMonitor |
void |
addPackage(Package pkg)
addPackage |
Enumeration<Monitor> |
enumerateMonitor()
enumerateMonitor |
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<String> |
getIpList(Package pkg)
Determine the list of IPs the filter rule for this package allows |
String |
getNextOutageIdSql()
getNextOutageIdSql |
Package |
getPackage(String name)
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. |
Iterable<String> |
includeURLs(Package pkg)
includeURLs |
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 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()
monitors |
boolean |
nodeOutageProcessingEnabled()
Returns true if node outage processing is enabled. |
Iterable<Package> |
packages()
packages |
Iterable<Parameter> |
parameters(Service svc)
parameters |
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()
releaseAllServiceMonitors |
void |
save()
Saves the current in-memory configuration to disk and reloads |
void |
saveResponseTimeData(String locationMonitor,
OnmsMonitoredService monSvc,
double responseTime,
Package pkg)
saveResponseTimeData |
protected abstract void |
saveXml(String xml)
saveXml |
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)
services |
boolean |
serviceUnresponsiveEnabled()
Returns true if serviceUnresponsive behavior is enabled. |
protected void |
setConfig(PollerConfiguration conf)
setConfig |
protected void |
setUpInternalData()
setUpInternalData |
protected void |
unmarshalConfig(InputStream is)
unmarshalConfig |
abstract void |
update()
update |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected PollerConfiguration m_config
| Constructor Detail |
|---|
public PollerConfigManager(Reader reader,
String localServer,
boolean verifyServer)
throws org.exolab.castor.xml.MarshalException,
org.exolab.castor.xml.ValidationException,
IOException
Constructor for PollerConfigManager.
reader - a Reader object.localServer - a String object.verifyServer - a boolean.
org.exolab.castor.xml.MarshalException - if any.
org.exolab.castor.xml.ValidationException - if any.
IOException - if any.
public PollerConfigManager(InputStream stream,
String localServer,
boolean verifyServer)
throws org.exolab.castor.xml.MarshalException,
org.exolab.castor.xml.ValidationException
Constructor for PollerConfigManager.
stream - a InputStream object.localServer - a String object.verifyServer - a boolean.
org.exolab.castor.xml.MarshalException - if any.
org.exolab.castor.xml.ValidationException - if any.| Method Detail |
|---|
protected void setConfig(PollerConfiguration conf)
setConfig
conf - a PollerConfiguration object.
protected void unmarshalConfig(InputStream is)
throws org.exolab.castor.xml.MarshalException,
org.exolab.castor.xml.ValidationException
unmarshalConfig
is - a InputStream object.
org.exolab.castor.xml.MarshalException - if any.
org.exolab.castor.xml.ValidationException - if any.protected void setUpInternalData()
setUpInternalData
public abstract void update()
throws IOException,
org.exolab.castor.xml.MarshalException,
org.exolab.castor.xml.ValidationException
update
update in interface PollerConfigIOException - if any.
org.exolab.castor.xml.MarshalException - if any.
org.exolab.castor.xml.ValidationException - if any.
protected abstract void saveXml(String xml)
throws IOException
saveXml
xml - a String object.
IOException - if any.
public void save()
throws org.exolab.castor.xml.MarshalException,
IOException,
org.exolab.castor.xml.ValidationException
save in interface PollerConfigorg.exolab.castor.xml.MarshalException - if any.
IOException - if any.
org.exolab.castor.xml.ValidationException - 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 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)
getIpList in interface PollerConfigpkg - a Package object.
List object.public 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)
getFirstLocalPackageMatch in interface PollerConfigipaddr - the interface to check
public 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 check
public boolean isPolledLocally(String ipaddr)
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)
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
enumeratePackage in interface PollerConfigEnumeration object.public Enumeration<Monitor> enumerateMonitor()
enumerateMonitor
Enumeration object.public Iterable<Service> services(Package pkg)
services
pkg - a Package object.
Iterable object.public Iterable<String> includeURLs(Package pkg)
includeURLs
pkg - a Package object.
Iterable object.public Iterable<Parameter> parameters(Service svc)
parameters
svc - a Service object.
Iterable object.public Iterable<Package> packages()
packages
Iterable object.public Iterable<Monitor> monitors()
monitors
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 String getNextOutageIdSql()
getNextOutageIdSql
getNextOutageIdSql in interface PollerConfigString object.public void releaseAllServiceMonitors()
releaseAllServiceMonitors
releaseAllServiceMonitors in interface PollerConfig
public void saveResponseTimeData(String locationMonitor,
OnmsMonitoredService monSvc,
double responseTime,
Package pkg)
saveResponseTimeData
saveResponseTimeData in interface PollerConfiglocationMonitor - a String object.monSvc - a OnmsMonitoredService object.responseTime - a double.pkg - a Package object.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||