spring-cloud-consul
spring-cloud-consul copied to clipboard
Add support for Docker Checks
Hi!
Consul supports health checking an application running into a container (while the consul agent is installed on the host). To do so, Consul uses a sort of docker exec ${containerId} my-health-check.sh
to determine if the application is healthy or not.
Here how the check looks in json format (taken from official documentation https://www.consul.io/docs/agent/checks.html) :
{
"check": {
"id": "mem-util",
"name": "Memory utilization",
"docker_container_id": "f972c95ebf0e",
"shell": "/bin/bash",
"args": ["/usr/local/bin/check_mem.py"],
"interval": "10s"
}
}
It seems that spring-cloud-consul does not support this yet. Are you planning to add this feature ?
FYI Ecwid has already the necessary API, here is an example :
NewCheck check= new NewCheck();
check.setDockerContainerID(containerId);
check.setShell(shell);
check.setScript(script);
Thanks,
+1