spring-cloud-consul icon indicating copy to clipboard operation
spring-cloud-consul copied to clipboard

Add support for Docker Checks

Open abdennebi opened this issue 7 years ago • 1 comments

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,

abdennebi avatar Oct 27 '17 10:10 abdennebi

+1

vigneshsenapathy avatar Feb 01 '18 14:02 vigneshsenapathy