spring-cloud / spring-cloud/spring-cloud-consul
Add support for Docker Checks
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 822
- Forks
- 539
- Avg merge
- 9h 31m
- Merged PRs (30d)
- 7
Description
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,
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the existing Spring Cloud Consul health-check configuration and its mapping to Consul's NewCheck API, then compare it with the Docker check example and the referenced Ecwid API. Done means Docker container ID, shell, and arguments can be represented and sent as a Consul check, with coverage for the new configuration.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, spring-boot
- Domain
- backend, cloud
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 32/100