- 重要な情報
- はじめに
- 用語集
- ガイド
- エージェント
- インテグレーション
- OpenTelemetry
- 開発者
- API
- CoScreen
- アプリ内
- Service Management
- インフラストラクチャー
- アプリケーションパフォーマンス
- 継続的インテグレーション
- ログ管理
- セキュリティ
- UX モニタリング
- 管理
Supported OS
Agent の Marathon チェックを使用して、以下のことができます。
Marathon チェックは Datadog Agent パッケージに含まれています。サーバーに追加でインストールする必要はありません。
ホストで実行中の Agent でこのチェックを構成する場合は、以下の手順に従ってください。コンテナ環境の場合は、コンテナ化セクションを参照してください。
ホストで実行中の Agent に対してこのチェックを構成するには:
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>"
username
と password
の関数は acs_url
を構成するかどうかに依存します。構成した場合、Agent はこれらを使用して ACS に認証トークンを要求し、それを使用して Marathon API に対する認証を行います。構成しない場合、Agent は username
と password
を使用して直接 Marathon API に対する認証を行います。
Agent バージョン 6.0 以降で利用可能
Datadog Agent で、ログの収集はデフォルトで無効になっています。以下のように、datadog.yaml
ファイルでこれを有効にします。
logs_enabled: true
Marathon は logback を使用するため、カスタムログ形式を指定できます。Datadog では、Marathon から提供されるデフォルトの形式と Datadog 推奨の形式の 2 つの形式がサポートされ、すぐに使用できます。次の例のように、ファイルアペンダーを構成に追加し、$PATTERN$
を選択した形式に置き換えます。
[%date] %-5level %message \(%logger:%thread\)%n
%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 のログの収集を開始するには、次の構成ブロックを marathon.d/conf.yaml
ファイルに追加します。
logs:
- type: file
path: /var/log/marathon.log
source: marathon
service: "<SERVICE_NAME>"
コンテナ環境の場合は、オートディスカバリーのインテグレーションテンプレートのガイドを参照して、次のパラメーターを適用してください。
パラメーター | 値 |
---|---|
<インテグレーション名> | marathon |
<初期コンフィギュレーション> | 空白または {} |
<インスタンスコンフィギュレーション> | {"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.deployments (gauge) | Number of running or pending deployments |
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.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.taskRateLimit (gauge) | The task rate limit for a given application; tagged by app_id and version |
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 |
Marathon チェックには、イベントは含まれません。
marathon.can_connect
API エンドポイントに接続できない、またはアプリケーションのインスタンスが動作していない場合に CRITICAL を、検出可能なアプリケーションがない場合に WARN を返します。収集した時点での応答ステータスに関する詳しい情報がチェックメッセージに記載されます。
Statuses: ok, クリティカル
ご不明な点は、Datadog のサポートチームまでお問合せください。