0

I need a curl command to find the applications and the time which were restarted in the last 30 minutes in mesos marathon.

For example, I hit the curl in the terminal like below:

curl http://marathon:5050/............

Then the output should be like:

APP    TIME_OF_RESTART

app1     2018-07-01 23:45PM IST

If I can get the curl command then I can write a script to automate it to provide the details required.

Uwe Keim
  • 39,551
  • 56
  • 175
  • 291
srethomas
  • 1
  • 5

1 Answers1

1

it looks like you may want to use the Marathon Event Bus which streams all Marathon events.

The parameter you would be interested in is unhealthy_task_kill_event if you are looking for tasks that failed health checks enough times and require a "restart".

From the Marathon REST API documentation:

If a task fails more than maxConsecutiveFailures health checks consecutively, that task is killed causing Marathon to start more instances. These restarts are modulated like any other failing app by backoffSeconds, backoffFactor and maxLaunchDelaySeconds. The kill of the unhealthy task is signalled via unhealthy_task_kill_event event.

ashahan
  • 166
  • 3