Supported OS Linux Mac OS

インテグレーションバージョン2.3.0

概要

Agent の Marathon チェックを使用して、以下のことができます。

  • すべてのアプリケーションの状態と健全性を追跡し、構成されているメモリ、ディスク、CPU、インスタンスを確認し、正常および異常なタスクの数を監視できます。
  • キューに置かれたアプリケーションの数やデプロイの数を監視できます。

計画と使用

インフラストラクチャーリスト

Marathon チェックは Datadog Agent パッケージに含まれています。サーバーに追加でインストールする必要はありません。

ブラウザトラブルシューティング

ホストで実行中の Agent でこのチェックを構成する場合は、以下の手順に従ってください。コンテナ環境の場合は、コンテナ化セクションを参照してください。

メトリクスベース SLO

ホストで実行中の Agent に対してこのチェックを構成するには

メトリクスの収集
  1. Agent のコンフィギュレーションディレクトリのルートにある conf.d/ フォルダーの marathon.d/conf.yaml ファイルを編集します。使用可能なすべてのコンフィギュレーションオプションの詳細については、サンプル marathon.d/conf.yaml を参照してください。

    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>"
    

    usernamepassword の関数は acs_url を構成するかどうかに依存します。構成した場合、Agent はこれらを使用して ACS に認証トークンを要求し、それを使用して Marathon API に対する認証を行います。構成しない場合、Agent は usernamepassword を使用して直接 Marathon API に対する認証を行います。

  2. Agent を再起動します

収集データ

Agent バージョン 6.0 以降で利用可能

  1. Datadog Agent で、ログの収集はデフォルトで無効になっています。以下のように、datadog.yaml ファイルでこれを有効にします。

    logs_enabled: true
    
  2. Marathon は logback を使用するため、カスタムログ形式を指定できます。Datadog では、Marathon から提供されるデフォルトの形式と Datadog 推奨の形式の 2 つの形式がサポートされ、すぐに使用できます。次の例のように、ファイルアペンダーを構成に追加し、$PATTERN$ を選択した形式に置き換えます。

    • Marathon のデフォルト形式: [%date] %-5level %message \(%logger:%thread\)%n
    • Datadog の推奨形式: %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>
    
  3. Marathon のログの収集を開始するには、次の構成ブロックを marathon.d/conf.yaml ファイルに追加します。

    logs:
      - type: file
        path: /var/log/marathon.log
        source: marathon
        service: "<SERVICE_NAME>"
    
  4. Agent を再起動します

コンテナ化

コンテナ環境の場合は、オートディスカバリーのインテグレーションテンプレートのガイドを参照して、次のパラメーターを適用してください。

メトリクスの収集
パラメーター
<INTEGRATION_NAME>marathon
<INIT_CONFIG>空白または {}
<INSTANCE_CONFIG>{"url": "https://%%host%%:%%port%%"}
収集データ

Agent バージョン 6.0 以降で利用可能

Datadog Agent で、ログの収集はデフォルトで無効になっています。有効にする方法については、Kubernetes ログ収集を参照してください。

パラメーター
<LOG_CONFIG>{"source": "marathon", "service": "<SERVICE_NAME>"}

検証

Agent の status サブコマンドを実行し、Checks セクションで marathon を探します。

リアルユーザーモニタリング

データセキュリティ

marathon.apps
(gauge)
Number of applications
marathon.backoffFactor
(gauge)
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
API エンドポイントに接続できない、またはアプリケーションのインスタンスが動作していない場合に CRITICAL を、検出可能なアプリケーションがない場合に WARN を返します。収集した時点での応答ステータスに関する詳しい情報がチェックメッセージに記載されます。
Statuses: ok, クリティカル

ヘルプ

ご不明な点は、Datadog のサポートチームまでお問合せください。