@Named @Singleton @Configurable public class HttpStatusHealthCheck extends HttpStatusHealthCheckImpl
Generates CRITICAL if the HTTP GET request failed to connect or the status
code does not match the regexp.
Constructor and Description |
---|
HttpStatusHealthCheck() |
Modifier and Type | Method and Description |
---|---|
void |
addUrl(java.lang.String url)
Adds a new URL to be tested.
|
void |
addUrlList(java.lang.String url)
Adds a new URL to be tested.
|
void |
init()
Initialize the pinger.
|
void |
setLogPeriod(Period period) |
void |
setPingHost(java.lang.String pingHost)
Sets the server's ping host
|
void |
setPingPort(int pingPort)
Sets the server's ping port (default 80)
|
void |
setRegexp(java.util.regex.Pattern regexp)
Set the HTTP status regular expression (default "200")
|
void |
setSocketTimeout(Period period)
Sets the socket connection timeout (default 10 seconds)
|
checkHealth, checkPing, getPingHost, getPingPort, getRegexp, getSocketTimeout, getUrls, readResponse, setSocketTimeout, toString
findDelegate, getDelegate, getLastResult, getLogPeriod, getName, hasDelegate, isEnabled, logResult, setEnabled, setName, silenceFor, start, stop
@PostConstruct public void init()
HttpStatusHealthCheckImpl
init
in class HttpStatusHealthCheckImpl
@Configurable public void setPingHost(java.lang.String pingHost)
setPingHost
in class HttpStatusHealthCheckImpl
@Configurable public void setPingPort(int pingPort)
setPingPort
in class HttpStatusHealthCheckImpl
@Configurable public void addUrl(java.lang.String url)
addUrl
in class HttpStatusHealthCheckImpl
@Configurable public void addUrlList(java.lang.String url)
addUrlList
in class HttpStatusHealthCheckImpl
@Configurable public void setSocketTimeout(Period period)
@Configurable public void setRegexp(java.util.regex.Pattern regexp)
setRegexp
in class HttpStatusHealthCheckImpl
@Configurable public void setLogPeriod(Period period)
setLogPeriod
in interface HealthCheck
setLogPeriod
in class AbstractHealthCheck