Datadog-Marathon Integration

Overview

The Agent’s Marathon check lets you:

  • Track the state and health of every application: see configured memory, disk, cpu, and instances; monitor the number of healthy and unhealthy tasks
  • Monitor the number of queued applications and the number of deployments

Setup

Installation

The Marathon check is packaged with the Agent, so simply install the Agent on your Marathon master. If you need the newest version of the check, install the dd-check-marathon package.

Configuration

Create a file marathon.yaml in the Agent’s conf.d directory. See the sample marathon.yaml for all available configuration options:

init_config:
  - default_timeout: 5 # how many seconds to wait for Marathon API response

instances:
  - url: https://<server>:<port> # the API endpoint of your Marathon master; required
#   acs_url: https://<server>:<port> # if your Marathon master requires ACS auth
    user: <username> # the user for marathon API or ACS token authentication
    password: <password> # the password for marathon API or ACS token authentication

The function of user and password depends on whether or not you configure acs_url; If you do, the Agent uses them to request an authentication token from ACS, which it then uses to authenticate to the Marathon API. Otherwise, the Agent uses user and password to directly authenticate to the Marathon API.

Restart the Agent to begin sending Marathon metrics to Datadog.

Validation

Run the Agent’s info subcommand and look for marathon under the Checks section:

  Checks
  ======
    [...]

    marathon
    -------
      - instance #0 [OK]
      - Collected 26 metrics, 0 events & 1 service check

    [...]

Compatibility

The marathon check is compatible with all major platforms.

Data Collected

Metrics

marathon.apps
(gauge)
Number of applications
shown as
marathon.deployments
(gauge)
Number of running or pending deployments
shown as
marathon.queue.size
(gauge)
Number of apps waiting to be deployed
shown as
marathon.backoffFactor
(gauge)
Backoff time multiplication factor for each consecutive failed task launch; tagged by app_id and version
shown as
marathon.backoffSeconds
(gauge)
Task backoff period; tagged by app_id and version
shown as second
marathon.cpus
(gauge)
Configured CPUs for each instance of a given application
shown as
marathon.disk
(gauge)
Configured CPU for each instance of a given application
shown as mebibyte
marathon.instances
(gauge)
Number of instances of a given application; tagged by app_id and version
shown as
marathon.mem
(gauge)
Configured memory for each instance of a given application; tagged by app_id and version
shown as mebibyte
marathon.taskRateLimit
(gauge)
The task rate limit for a given application; tagged by app_id and version
shown as
marathon.tasksRunning
(gauge)
Number of tasks running for a given application; tagged by app_id and version
shown as task
marathon.tasksStaged
(gauge)
Number of tasks staged for a given application; tagged by app_id and version
shown as task
marathon.tasksHealthy
(gauge)
Number of healthy tasks for a given application; tagged by app_id and version
shown as task
marathon.tasksUnhealthy
(gauge)
Number of unhealthy tasks for a given application; tagged by app_id and version
shown as task
marathon.queue.size
(gauge)
Number of app offer queues
shown as task
marathon.queue.count
(gauge)
Number of instances left to launch
shown as task
marathon.queue.delay
(gauge)
Wait before the next launch attempt
shown as second
marathon.queue.offers.processed
(gauge)
The number of processed offers for this launch attempt
shown as task
marathon.queue.offers.unused
(gauge)
The number of unused offers for this launch attempt
shown as task
marathon.queue.offers.reject.last
(gauge)
Summary of unused offers for all last offers
shown as task
marathon.queue.offers.reject.launch
(gauge)
Summary of unused offers for the launch attempt
shown as task

Events

The Marathon check does not include any event at this time.

Service Checks

marathon.can_connect:

Returns CRITICAL if the Agent cannot connect to the Marathon API to collect metrics, otherwise OK.

Troubleshooting

Need help? Contact Datadog Support.

Further Reading

Learn more about infrastructure monitoring and all our integrations on our blog