Skip to content
This repository has been archived by the owner on Apr 17, 2023. It is now read-only.

Map health checks #11

Open
jzaefferer opened this issue Feb 5, 2018 · 0 comments
Open

Map health checks #11

jzaefferer opened this issue Feb 5, 2018 · 0 comments

Comments

@jzaefferer
Copy link
Contributor

jzaefferer commented Feb 5, 2018

This is a bit more complicated. Durations needs to be mapped to seconds, the test property needs to be restricted to something mappable.

docker-compose.yml sample:

healthcheck:
  test: ["CMD", "curl", "-f", "http://localhost"]
  interval: 1m30s
  timeout: 10s
  retries: 3
  start_period: 40s

sloppy.yml sample:

healthchecks:
- timeout: 10
  interval: 10
  max_consecutive_failures: 3
  path: "/"
  type: "HTTP"
  grace_period_seconds: 3
  • interval as duration to interval in seconds
  • timeout as duration to timeout in seconds
  • start_period as duration to grace_period_seconds in seconds
  • retries to max_consecutive_failures (I guess)
  • test somehow to type and, optionally, path

sloppy.io health checks can be of type: "HTTP", along with a path property, or type: "TCP", without an additional property.

A potential heuristic: Check if test contains a URL and use the path (if none, use /) for a HTTP type check. If there is no URL, use TCP.

This

healthcheck:
  test: ["CMD", "curl", "-f", "http://localhost"]

would map to

health_checks:
  - type: "HTTP"
    path: "/"

See https://docs.docker.com/compose/compose-file/#healthcheck and https://kb.sloppy.io/features/health-checks

Definitely lower priority than everything else.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant