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 authenticationusername:"<USERNAME>"# the password for Marathon API or ACS token authenticationpassword:"<PASSWORD>"
username 및 password 의 기능은 acs_url 구성 여부에 따라 달라집니다. 그렇게 하면 Agent는 이를 사용하여 ACS에서 인증 토큰을 요청한 다음 이를 Marathon API에 인증하는 데 사용합니다. 그렇지 않은 경우 Agent는 username 및 password 를 사용하여 Marathon API에 직접 인증합니다.
Datadog 에이전트에서 로그 수집은 기본적으로 사용하지 않도록 설정되어 있습니다. datadog.yaml파일에서 로그 수집을 사용하도록 설정합니다.
logs_enabled:true
Marathon은 로그백을 사용하므로 커스텀 로그 형식을 지정할 수 있습니다. Datadog을 사용하면 기본적으로 Marathon에서 제공하는 기본 형식과 Datadog 권장 형식이라는 두 가지 형식이 지원됩니다. 다음 예와 같이 구성에 파일 어펜더를 추가하고 선택한 형식으로 $PATTERN$를 바꿉니다.
<?xml version="1.0" encoding="UTF-8"?><configuration><shutdownHookclass="ch.qos.logback.core.hook.DelayingShutdownHook"/><appendername="stdout"class="ch.qos.logback.core.ConsoleAppender"><encoder><pattern>[%date] %-5level %message \(%logger:%thread\)%n</pattern></encoder></appender><appendername="async"class="ch.qos.logback.classic.AsyncAppender"><appender-refref="stdout"/><queueSize>1024</queueSize></appender><appendername="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><rootlevel="INFO"><appender-refref="async"/><appender-refref="FILE"/></root></configuration>
Marathon 로그 수집을 시작하려면 marathon.d/conf.yaml 파일에 다음 구성 블록을 추가하세요.
Backoff time multiplication factor for each consecutive failed task launch; tagged by app_id and version
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
marathon.deployments (gauge)
Number of running or pending deployments
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
marathon.mem (gauge)
Configured memory for each instance of a given application; tagged by app_id and version Shown as mebibyte
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.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
marathon.queue.offers.unused (gauge)
The number of unused offers for this launch attempt Shown as task
marathon.queue.size (gauge)
Number of app offer queues Shown as task
marathon.taskRateLimit (gauge)
The task rate limit for a given application; tagged by app_id and version
marathon.tasksHealthy (gauge)
Number of healthy tasks for a given application; tagged by app_id and version Shown as task
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.tasksUnhealthy (gauge)
Number of unhealthy tasks for a given application; tagged by app_id and version Shown as task
이벤트
Marathon 점검은 이벤트를 포함하지 않습니다.
서비스 점검
marathon.can_connect
CRITICAL if either cannot connect to API endpoint or no instances of any application are running. WARN if no applications are detected. Additional information about response status at the time of collection is included in the check message.