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
The Marathon check is included in the Datadog Agent package, so you don't need to install anything else on your Marathon master.
Follow the instructions below to configure this check for an Agent running on a host. For containerized environments, see the Containerized section.
To configure this check for an Agent running on a host:
-
Edit the
marathon.d/conf.yaml
file, in theconf.d/
folder at the root of your Agent's configuration directory. See the sample marathon.d/conf.yaml for all available configuration options:init_config: instances: # the API endpoint of your Marathon master; required - url: "https://<SERVER>:<PORT>" # if your Marathon master requires ACS auth # acs_url: https://<SERVER>:<PORT> # the username for Marathon API or ACS token authentication username: "<USERNAME>" # the password for Marathon API or ACS token authentication password: "<PASSWORD>"
The function of
username
andpassword
depends on whether or not you configureacs_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 usesusername
andpassword
to directly authenticate to the Marathon API.
Available for Agent versions >6.0
-
Collecting logs is disabled by default in the Datadog Agent, enable it in your
datadog.yaml
file:logs_enabled: true
-
Because Marathon uses logback, you can specify a custom log format. With Datadog, two formats are supported out of the box: the default one provided by Marathon and the Datadog recommended format. Add a file appender to your configuration as in the following example and replace
$PATTERN$
with your selected format:- Marathon default:
[%date] %-5level %message \(%logger:%thread\)%n
- Datadog recommended:
%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n
<?xml version="1.0" encoding="UTF-8"?> <configuration> <shutdownHook class="ch.qos.logback.core.hook.DelayingShutdownHook"/> <appender name="stdout" class="ch.qos.logback.core.ConsoleAppender"> <encoder> <pattern>[%date] %-5level %message \(%logger:%thread\)%n</pattern> </encoder> </appender> <appender name="async" class="ch.qos.logback.classic.AsyncAppender"> <appender-ref ref="stdout" /> <queueSize>1024</queueSize> </appender> <appender name="FILE" class="ch.qos.logback.core.FileAppender"> <file>/var/log/marathon.log</file> <append>true</append> <!-- set immediateFlush to false for much higher logging throughput --> <immediateFlush>true</immediateFlush> <encoder> <pattern>$PATTERN$</pattern> </encoder> </appender> <root level="INFO"> <appender-ref ref="async"/> <appender-ref ref="FILE"/> </root> </configuration>
- Marathon default:
-
Add this configuration block to your
marathon.d/conf.yaml
file to start collecting your Marathon logs:logs: - type: file path: /var/log/marathon.log source: marathon service: "<SERVICE_NAME>"
For containerized environments, see the Autodiscovery Integration Templates for guidance on applying the parameters below.
Parameter | Value |
---|---|
<INTEGRATION_NAME> |
marathon |
<INIT_CONFIG> |
blank or {} |
<INSTANCE_CONFIG> |
{"url": "https://%%host%%:%%port%%"} |
Available for Agent versions >6.0
Collecting logs is disabled by default in the Datadog Agent. To enable it, see Kubernetes log collection documentation.
Parameter | Value |
---|---|
<LOG_CONFIG> |
{"source": "marathon", "service": "<SERVICE_NAME>"} |
Run the Agent's status subcommand and look for marathon
under the Checks section.
See metadata.csv for a list of metrics provided by this integration.
The Marathon check does not include any events.
marathon.can_connect:
Returns CRITICAL
if the Agent cannot connect to the Marathon API to collect metrics, otherwise returns OK
.
Need help? Contact Datadog support.