spring-cloud / spring-cloud/spring-cloud-consul

Add support for Docker Checks

Open
#369 1 comment 7 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement help wanted
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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.