public class OpenNMSProvisioner extends Object implements Provisioner
OpenNMSProvisioner class.
Constructor and Description |
---|
OpenNMSProvisioner() |
Modifier and Type | Method and Description |
---|---|
boolean |
addServiceDatabase(String serviceId,
int retry,
int timeout,
int interval,
int downTimeInterval,
int downTimeDuration,
String user,
String password,
String driver,
String url)
This method defines a new package and Database(JDBC) service using the
serviceId as the name of the
polling package and service name within that package. |
boolean |
addServiceDNS(String serviceId,
int retry,
int timeout,
int interval,
int downTimeInterval,
int downTimeDuration,
int port,
String lookup)
This method defines a new package and DNS service using the
serviceId as the name of the
polling package and service name within that package. |
boolean |
addServiceHTTP(String serviceId,
int retry,
int timeout,
int interval,
int downTimeInterval,
int downTimeDuration,
String hostName,
int port,
String response,
String responseText,
String url,
String user,
String passwd,
String agent)
This method defines a new package and HTTP service using the
serviceId as the name of the
polling package and service name within that package. |
boolean |
addServiceHTTPS(String serviceId,
int retry,
int timeout,
int interval,
int downTimeInterval,
int downTimeDuration,
String hostName,
int port,
String response,
String responseText,
String url,
String user,
String passwd,
String agent)
This method defines a new package and HTTPS service using the
serviceId as the name of the
polling package and service name within that package. |
boolean |
addServiceICMP(String serviceId,
int retry,
int timeout,
int interval,
int downTimeInterval,
int downTimeDuration)
This method defines a new package and ICMP service using the
serviceId as the name of the
polling package and service name within that package. |
boolean |
addServiceTCP(String serviceId,
int retry,
int timeout,
int interval,
int downTimeInterval,
int downTimeDuration,
int port,
String banner)
This method defines a new package and TCP service using the
serviceId as the name of the
polling package and service name within that package. |
Parameter |
findParameterWithKey(Service svc,
String key)
findParamterWithKey
|
Map<String,Object> |
getServiceConfiguration(String pkgName,
String serviceId)
Returns an XML-RPC compatible hash map representing the current configuration (see addService params) for
the matching
String serviceId
When a service is defined using XML-RPC, the package name and the service name will be the same. |
void |
setEventManager(EventIpcManager eventManager)
setEventManager
|
void |
setPollerConfig(PollerConfig pollerConfig)
setPollerConfig
|
public boolean addServiceICMP(String serviceId, int retry, int timeout, int interval, int downTimeInterval, int downTimeDuration)
serviceId
as the name of the
polling package and service name within that package. If the same serviceId
is used again,
it redefines the service.
To add an interface to this newly defined ICMP service,
send an EventConstants.UPDATE_SERVICE_EVENT_UEI
Event
.addServiceICMP
in interface Provisioner
serviceId
- String
is used to define a polling package and a service name in that polling package.retry
- int
number of retries for this servicetimeout
- int
time in milliseconds to wait during each retries
interval
- int
the standard polling interval in millisecondsdownTimeInterval
- int
the downtime polling interval in milliseconds(downtime model)downTimeDuration
- int> the amount of time in milliseconds the downtime polling interval is in effect
public Parameter findParameterWithKey(Service svc, String key)
findParamterWithKey
public boolean addServiceDNS(String serviceId, int retry, int timeout, int interval, int downTimeInterval, int downTimeDuration, int port, String lookup)
serviceId
as the name of the
polling package and service name within that package. If the same serviceId
is used again,
it redefines the service.
To add an interface to this newly defined DNS service,
send an EventConstants.UPDATE_SERVICE_EVENT_UEI
Event
.addServiceDNS
in interface Provisioner
serviceId
- String
is used to define a polling package and a service name in that polling package.retry
- int
number of retries for this servicetimeout
- int
time in milliseconds to wait during each retries
interval
- int
the standard polling interval in millisecondsdownTimeInterval
- int
the downtime polling interval in milliseconds(downtime model)downTimeDuration
- int> the amount of time in milliseconds the downtime polling interval is in effect
port
- int
the port to poll for DNS servicelookup
- String
the hostname to resolve with the DNS servicepublic boolean addServiceTCP(String serviceId, int retry, int timeout, int interval, int downTimeInterval, int downTimeDuration, int port, String banner)
serviceId
as the name of the
polling package and service name within that package. If the same serviceId
is used again,
it redefines the service.
To add an interface to this newly defined TCP service,
send an EventConstants.UPDATE_SERVICE_EVENT_UEI
Event
.addServiceTCP
in interface Provisioner
serviceId
- String
is used to define a polling package and a service name in that polling package.retry
- int
number of retries for this servicetimeout
- int
time in milliseconds to wait during each retries
interval
- int
the standard polling interval in millisecondsdownTimeInterval
- int
the downtime polling interval in milliseconds(downtime model)downTimeDuration
- int> the amount of time in milliseconds the downtime polling interval is in effect
port
- int
the port to attempt to connect to determine if the service is accepting connectionsbanner
- String
a string to check for in the returned banner of the TCP service or "" if no check is desired.public boolean addServiceHTTP(String serviceId, int retry, int timeout, int interval, int downTimeInterval, int downTimeDuration, String hostName, int port, String response, String responseText, String url, String user, String passwd, String agent) throws MalformedURLException
serviceId
as the name of the
polling package and service name within that package. If the same serviceId
is used again,
it redefines the service.
To add an interface to this newly defined HTTP service,
send an EventConstants.UPDATE_SERVICE_EVENT_UEI
Event
.addServiceHTTP
in interface Provisioner
serviceId
- String
is used to define a polling package and a service name in that polling package.retry
- int
number of retries for this servicetimeout
- int
time in milliseconds to wait during each retries
interval
- int
the standard polling interval in millisecondsdownTimeInterval
- int
the downtime polling interval in milliseconds(downtime model)downTimeDuration
- int> the amount of time in milliseconds the downtime polling interval is in effect
hostName
- String
the virtual host (requires a url other than just "/")port
- int
the port to attempt to connect to determine if the service is accepting connectionsresponse
- String
a set of responseCodes that are considered valid.
This string should consist of one or more ranges ( [range],[range],...) where a range is either a single number or
a pair of number separated by a - ( 200,202-300 ). If the default range check is desire this can be ""
The default range check is defined by the HttpMonitor plugin and is currently 100-499 for / or 100-399 for other URLsresponseText
- String
a string to check for in the returned web page. This string is either an exact string
to search for in the page or a regular expression. To indicate a regular expression prefix the string with a '~' characterurl
- String
the path portion of the URL to check on the serveruser
- String
the user to use with basic authentication or "" if no authentication requiredpasswd
- String
the password to use with the user parameter with doing authenticationagent
- String
the String to use for the User agent field when communicating with the serverMalformedURLException
- if any.public boolean addServiceHTTPS(String serviceId, int retry, int timeout, int interval, int downTimeInterval, int downTimeDuration, String hostName, int port, String response, String responseText, String url, String user, String passwd, String agent) throws MalformedURLException
serviceId
as the name of the
polling package and service name within that package. If the same serviceId
is used again,
it redefines the service.
To add an interface to this newly defined HTTPS service,
send an EventConstants.UPDATE_SERVICE_EVENT_UEI
Event
.addServiceHTTPS
in interface Provisioner
serviceId
- String
is used to define a polling package and a service name in that polling package.retry
- int
number of retries for this servicetimeout
- int
time in milliseconds to wait during each retries
interval
- int
the standard polling interval in millisecondsdownTimeInterval
- int
the downtime polling interval in milliseconds(downtime model)downTimeDuration
- int
the amount of time in milliseconds the downtime polling interval is in effecthostName
- String
the virtual host (requires a url other than just "/")port
- int
the port to attempt to connect to determine if the service is accepting connectionsresponse
- String
a set of responseCodes that are considered valid.
This string should consist of one or more ranges ( [range],[range],...) where a range is either a single number or
a pair of number separated by a - ( 200,202-300 ). If the default range check is desire this can be ""
The default range check is defined by the HttpMonitor plugin and is currently 100-499 for / or 100-399 for other URLsresponseText
- String
a string to check for in the returned web page. This string is either an exact string
to search for in the page or a regular expression. To indicate a regular expression prefix the string with a '~' characterurl
- String
the path portion of the URL to check on the serveruser
- String
the user to use with basic authentication or "" if no authentication requiredpasswd
- String
the password to use with the user parameter with doing authenticationagent
- String
the String to use for the User agent field when communicating with the serverMalformedURLException
- if any.public boolean addServiceDatabase(String serviceId, int retry, int timeout, int interval, int downTimeInterval, int downTimeDuration, String user, String password, String driver, String url)
serviceId
as the name of the
polling package and service name within that package. If the same serviceId
is used again,
it redefines the service.
To add an interface to this newly defined Database(JDBC) service,
send an EventConstants.UPDATE_SERVICE_EVENT_UEI
Event
.addServiceDatabase
in interface Provisioner
serviceId
- String
is used to define a polling package and a service name in that polling package.retry
- int
number of retries for this servicetimeout
- int
time in milliseconds to wait during each retries
interval
- int
the standard polling interval in millisecondsdownTimeInterval
- int
the downtime polling interval in milliseconds(downtime model)downTimeDuration
- int
the amount of time in milliseconds the downtime polling interval is in effectuser
- String
the user to pass to the JDBC connectionpassword
- String
the password to pass to the JDBC connectiondriver
- String
the fully qualified name of the JDBC Driver classurl
- String
the url used to make a JDBC connection to the databasepublic Map<String,Object> getServiceConfiguration(String pkgName, String serviceId)
String
serviceId
When a service is defined using XML-RPC, the package name and the service name will be the same.getServiceConfiguration
in interface Provisioner
pkgName
- Name of the polling package i.e. "default" or custom package "FastHTTP"serviceId
- Name of the service, i.e. "ICMP" or a custom service "FastHTTP"public void setPollerConfig(PollerConfig pollerConfig)
setPollerConfig
pollerConfig
- a PollerConfig
object.public void setEventManager(EventIpcManager eventManager)
setEventManager
eventManager
- a EventIpcManager
object.Copyright © 2015. All rights reserved.