public abstract class HealthCheck extends Descriptor
{
"type" : "http",
"path" : "/path/to/healthcheck",
"port" : "http-admin"
}
TCP health check:
{
"type" : "tcp",
"port" : "http-admin"
}
`docker exec`-based health check:
{
"type" : "exec",
"command" : ["bash", "-c", "/usr/bin/curl 127.0.0.1:9200/_cluster/health | grep green"]
}
| Modifier and Type | Field and Description |
|---|---|
static String |
EXEC |
static String |
HTTP |
static String |
TCP |
| Modifier and Type | Method and Description |
|---|---|
String |
getType() |
static ExecHealthCheck.Builder |
newExecHealthCheck() |
static HttpHealthCheck.Builder |
newHttpHealthCheck() |
static TcpHealthCheck.Builder |
newTcpHealthCheck() |
parse, parse, toJsonBytes, toJsonStringpublic static final String EXEC
public static final String HTTP
public static final String TCP
public String getType()
public static ExecHealthCheck.Builder newExecHealthCheck()
public static HttpHealthCheck.Builder newHttpHealthCheck()
public static TcpHealthCheck.Builder newTcpHealthCheck()
Copyright © 2016. All rights reserved.