Public | Automated Build

Last pushed: 2 years ago
Short Description
Marathon apps registrator for Consul
Full Description


This program inspects running apps on a Marathon cluster and register each task within Consul.

Naming conventions

Service are named in dashed reverse order, only with characters allowed in Consul. So, for instance, for a Marathon app in /website/production/front exposing two ports, two services will be registered in Consul through their port index :

  • port0-front-production-website.service.consul
  • port1-front-production-website.service.consul

On top of that, service with only one port mapping also get registered without the leading port section, like this:

  • front-production-website.service.consul

Other than that, it is a regular Consul service registration, where each Marathon task will get one entry.


$ ./marathon-consul -help
Usage of ./marathon-consul:
  -consul string
        address to a consul agent (default "")
        should we expose an healthcheck endpoint
  -healthcheck-port int
        port on which to expose the healthcheck endpoint (default 8080)
  -interval duration
        interval in seconds for marathon checks (default 10s)
  -marathon string
        zookeeper path to marathon (default "/marathon")
  -master string
        comma-separated list of zookeeper servers (default "")

$ ./marathon-consul -master, -interval 10s

Docker usage

$ docker pull apognu/marathon-consul
$ docker run -master, -interval 10s -consul
Docker Pull Command
Source Repository