How to use healthChecks marathon?

I am running git clone https://github.com/mesosphere/marathon.git to download the latest marathon. And I knew from the marathon document that we can set the "healthChecks" property to control the work.

but when I start the marathon, I can’t find the "healthChecks" property anywhere,

And I'm sure that the marathon I had was the last.

Can anyone tell me how to use "healthChecks"?

This is a marathon dock for "healthChecks"

And you can see it at http://mesosphere.imtqy.com/marathon/docs/rest-api.html#post-v2-apps

  "healthChecks": [ { "protocol": "HTTP", "path": "/health", "gracePeriodSeconds": 3, "intervalSeconds": 10, "portIndex": 0, "timeoutSeconds": 10, "maxConsecutiveFailures": 3 }, { "protocol": "TCP", "gracePeriodSeconds": 3, "intervalSeconds": 5, "portIndex": 1, "timeoutSeconds": 5, "maxConsecutiveFailures": 3 }, { "protocol": "COMMAND", "command": { "value": "curl -f -X GET http://$HOST:$PORT0/health" }, "maxConsecutiveFailures": 3 } ], 
+6
source share
2 answers

The doc " Health Checks page contains detailed information on how to use them.

Screenshot of Health Check in Marathon 0.11

Note that health checks are application-specific, which means you must implement them in your application and expose them, because only you know what a healthy state is in your application.

For example, the marathon itself has / ping , which indicates the basic availability of the service.

+9
source

Editing health checks is not available in the web interface up to version v0.13.0, see release notes :

Improved use of modal. The create / edit modal application has undergone significant improvements in architecture and UX. Now you can specify application labels, accepted resource roles, user field, and health checks . In addition, smaller-scale input validation and error handling have been implemented.

In lower versions you should use the Marathon REST API

0
source

All Articles