このチェックでは、Mesos マスターのメトリクスを収集します。Mesos スレーブのメトリクスについては、Mesos Slave インテグレーションを参照してください。

Mesos マスターダッシュボード

概要

このチェックは、Mesos マスターから以下の情報に関するメトリクスを収集します。

  • クラスターリソース
  • スレーブ (登録済み、アクティブ、非アクティブ、接続済み、切断済みなど)
  • タスクの数 (失敗、終了、ステージング済み、実行中など)
  • フレームワークの数 (アクティブ、非アクティブ、接続済み、切断済み)

その他にも多数あります。

計画と使用

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

DC/OS の有無にかかわらず、Mesos でのインストールは同じです。各 Mesos マスターノードで datadog-agent コンテナを実行します。

docker run -d --name datadog-agent \
  -v /var/run/docker.sock:/var/run/docker.sock:ro \
  -v /proc/:/host/proc/:ro \
  -v /sys/fs/cgroup/:/host/sys/fs/cgroup:ro \
  -e DD_API_KEY=<YOUR_DATADOG_API_KEY> \
  -e MESOS_MASTER=true \
  -e MARATHON_URL=http://leader.mesos:8080 \
  datadog/agent:latest

上のコマンドの Datadog API キーと Mesos Master の API URL は、適切な値に置き換えてください。

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

正しい Master URL を渡して datadog-agent を起動した場合、Agent は、既にデフォルトの mesos_master.d/conf.yaml を使用してマスターからメトリクスを収集しています。使用可能なすべての構成オプションの詳細については、サンプル mesos_master.d/conf.yaml を参照してください。

ただし、マスターの API が自己署名証明書を使用しない場合は、mesos_master.d/conf.yamldisable_ssl_validation: true を設定してください。

収集データ

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

    logs_enabled: true
    
  2. Mesos のログの収集を開始するには、次の構成ブロックを mesos_master.d/conf.yaml ファイルに追加します。

    logs:
      - type: file
        path: /var/log/mesos/*
        source: mesos
    

    path パラメーターの値を環境に合わせて変更するか、デフォルトの Docker stdout を使用します。

    logs:
      - type: docker
        source: mesos
    

    使用可能なすべての構成オプションの詳細については、サンプル mesos_master.d/conf.yaml を参照してください。

  3. Agent を再起動します

Kubernetes 環境のログを有効にするには、Kubernetes ログ収集を参照してください。

検証

Datadog で、メトリクスエクスプローラーを使用して mesos.cluster を検索します。

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

データセキュリティ

mesos.cluster.cpus_percent
(gauge)
Percentage of allocated CPUs
Shown as percent
mesos.cluster.cpus_total
(gauge)
Number of CPUs
mesos.cluster.cpus_used
(gauge)
Number of allocated CPUs
mesos.cluster.disk_percent
(gauge)
Percentage of allocated disk space
Shown as percent
mesos.cluster.disk_total
(gauge)
Disk space
Shown as mebibyte
mesos.cluster.disk_used
(gauge)
Allocated disk space
Shown as mebibyte
mesos.cluster.dropped_messages
(gauge)
Number of dropped messages
Shown as message
mesos.cluster.event_queue_dispatches
(gauge)
Number of dispatches in the event queue
mesos.cluster.event_queue_http_requests
(gauge)
Number of HTTP requests in the event queue
Shown as request
mesos.cluster.event_queue_messages
(gauge)
Number of messages in the event queue
Shown as message
mesos.cluster.frameworks_active
(gauge)
Number of active frameworks
mesos.cluster.frameworks_connected
(gauge)
Number of connected frameworks
mesos.cluster.frameworks_disconnected
(gauge)
Number of disconnected frameworks
mesos.cluster.frameworks_inactive
(gauge)
Number of inactive frameworks
mesos.cluster.gpus_percent
(gauge)
Percentage of allocated GPUs
Shown as percent
mesos.cluster.gpus_total
(gauge)
Number of GPUs
mesos.cluster.gpus_used
(gauge)
Number of allocated GPUs
mesos.cluster.invalid_framework_to_executor_messages
(gauge)
Number of invalid framework messages
Shown as message
mesos.cluster.invalid_status_update_acknowledgements
(gauge)
Number of invalid status update acknowledgements
mesos.cluster.invalid_status_updates
(gauge)
Number of invalid status updates
mesos.cluster.mem_percent
(gauge)
Percentage of allocated memory
Shown as percent
mesos.cluster.mem_total
(gauge)
Total memory
Shown as mebibyte
mesos.cluster.mem_used
(gauge)
Allocated memory
Shown as mebibyte
mesos.cluster.outstanding_offers
(gauge)
Number of outstanding resource offers
mesos.cluster.slave_registrations
(gauge)
Number of slaves that were able to cleanly re-join the cluster and connect back to the master after the master is disconnected.
mesos.cluster.slave_removals
(gauge)
Number of slaves removed for various reasons, including maintenance
mesos.cluster.slave_reregistrations
(gauge)
Number of slave re-registrations
mesos.cluster.slave_shutdowns_canceled
(gauge)
Number of cancelled slave shutdowns
mesos.cluster.slave_shutdowns_scheduled
(gauge)
Number of slaves which have failed their health check and are scheduled to be removed
mesos.cluster.slaves_active
(gauge)
Number of active slaves
mesos.cluster.slaves_connected
(gauge)
Number of connected slaves
mesos.cluster.slaves_disconnected
(gauge)
Number of disconnected slaves
mesos.cluster.slaves_inactive
(gauge)
Number of inactive slaves
mesos.cluster.tasks_error
(gauge)
Number of tasks that were invalid
Shown as task
mesos.cluster.tasks_failed
(count)
Number of failed tasks
Shown as task
mesos.cluster.tasks_finished
(count)
Number of finished tasks
Shown as task
mesos.cluster.tasks_killed
(count)
Number of killed tasks
Shown as task
mesos.cluster.tasks_lost
(count)
Number of lost tasks
Shown as task
mesos.cluster.tasks_running
(gauge)
Number of running tasks
Shown as task
mesos.cluster.tasks_staging
(gauge)
Number of staging tasks
Shown as task
mesos.cluster.tasks_starting
(gauge)
Number of starting tasks
Shown as task
mesos.cluster.valid_framework_to_executor_messages
(gauge)
Number of valid framework messages
Shown as message
mesos.cluster.valid_status_update_acknowledgements
(gauge)
Number of valid status update acknowledgements
mesos.cluster.valid_status_updates
(gauge)
Number of valid status updates
mesos.framework.cpu
(gauge)
Framework cpu
mesos.framework.disk
(gauge)
Framework disk
Shown as mebibyte
mesos.framework.mem
(gauge)
Framework mem
Shown as mebibyte
mesos.registrar.log.recovered
(gauge)
Registrar log recovered
mesos.registrar.queued_operations
(gauge)
Number of queued operations
mesos.registrar.registry_size_bytes
(gauge)
Registry size
Shown as byte
mesos.registrar.state_fetch_ms
(gauge)
Registry read latency
Shown as millisecond
mesos.registrar.state_store_ms
(gauge)
Registry write latency
Shown as millisecond
mesos.registrar.state_store_ms.count
(gauge)
Registry write count
mesos.registrar.state_store_ms.max
(gauge)
Maximum registry write latency
Shown as millisecond
mesos.registrar.state_store_ms.min
(gauge)
Minimum registry write latency
Shown as millisecond
mesos.registrar.state_store_ms.p50
(gauge)
Median registry write latency
Shown as millisecond
mesos.registrar.state_store_ms.p90
(gauge)
90th percentile registry write latency
Shown as millisecond
mesos.registrar.state_store_ms.p95
(gauge)
95th percentile registry write latency
Shown as millisecond
mesos.registrar.state_store_ms.p99
(gauge)
99th percentile registry write latency
Shown as millisecond
mesos.registrar.state_store_ms.p999
(gauge)
99.9th percentile registry write latency
Shown as millisecond
mesos.registrar.state_store_ms.p9999
(gauge)
99.99th percentile registry write latency
Shown as millisecond
mesos.role.cpu
(gauge)
Role cpu
mesos.role.disk
(gauge)
Role disk
Shown as mebibyte
mesos.role.mem
(gauge)
Role mem
Shown as mebibyte
mesos.stats.elected
(gauge)
Whether this is the elected master
mesos.stats.registered
(gauge)
Whether this slave is registered with a master
mesos.stats.system.cpus_total
(gauge)
Number of CPUs available
mesos.stats.system.load_15min
(gauge)
Load average for the past 15 minutes
mesos.stats.system.load_1min
(gauge)
Load average for the past minutes
mesos.stats.system.load_5min
(gauge)
Load average for the past 5 minutes
mesos.stats.system.mem_free_bytes
(gauge)
Free memory
Shown as byte
mesos.stats.system.mem_total_bytes
(gauge)
Total memory
Shown as byte
mesos.stats.uptime_secs
(gauge)
Uptime
Shown as second

ヘルプ

Mesos-master チェックには、イベントは含まれません。

ヘルプ

mesos_master.can_connect
Returns CRITICAL if the Agent cannot connect to the Mesos Master API to collect metrics, UNKNOWN if the master is not detected as the leader, otherwise OK.
Statuses: ok, critical, unknown

ヘルプ

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

その他の参考資料

Mesos Slave インテグレーション

Mesos スレーブダッシュボード

概要

この Agent チェックは、Mesos スレーブから以下の情報に関するメトリクスを収集します。

  • システム負荷
  • タスクの数 (失敗、終了、ステージング済み、実行中など)
  • エグゼキューターの数 (実行中、途中終了など)

その他にも多数あります。

このチェックは、エグゼキュータータスクごとにサービスチェックも作成します。

計画と使用

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

DC/OS の Web UIを使用して各 Mesos エージェントノードに Datadog Agent をインストールするには、DC/OS で Mesos に Datadog をインストールするを参照してください。

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

DC/OS

  1. DC/OS Web UI で、Universe タブをクリックします。datadog パッケージを見つけ、Install ボタンをクリックします。
  2. Advanced Installation ボタンをクリックします。
  3. 最初のフィールドに Datadog API キーを入力します。
  4. Instances フィールドに、クラスター内のスレーブノードの数を入力します (クラスター内のノードの数は、DC/OS Web UI の左側にある Nodes タブをクリックすると確認できます)。
  5. Review and Install をクリックし、Install をクリックします。

Marathon

DC/OS を使用していない場合は、Marathon Web UI を使用するか、次の JSON を API URL にポストして、Datadog Agent を定義します。<YOUR_DATADOG_API_KEY> をご使用の API キーに置き換え、インスタンスの数をクラスター内のスレーブノードの数に置き換える必要があります。また、使用される Docker イメージを最新のタグに更新する必要があります。最新のイメージは Docker Hub にあります。

{
  "id": "/datadog-agent",
  "cmd": null,
  "cpus": 0.05,
  "mem": 256,
  "disk": 0,
  "instances": 1,
  "constraints": [
    ["hostname", "UNIQUE"],
    ["hostname", "GROUP_BY"]
  ],
  "acceptedResourceRoles": ["slave_public", "*"],
  "container": {
    "type": "DOCKER",
    "volumes": [
      {
        "containerPath": "/var/run/docker.sock",
        "hostPath": "/var/run/docker.sock",
        "mode": "RO"
      },
      { "containerPath": "/host/proc", "hostPath": "/proc", "mode": "RO" },
      {
        "containerPath": "/host/sys/fs/cgroup",
        "hostPath": "/sys/fs/cgroup",
        "mode": "RO"
      }
    ],
    "docker": {
      "image": "datadog/agent:latest",
      "network": "BRIDGE",
      "portMappings": [
        {
          "containerPort": 8125,
          "hostPort": 8125,
          "servicePort": 10000,
          "protocol": "udp",
          "labels": {}
        }
      ],
      "privileged": false,
      "parameters": [
        { "key": "name", "value": "datadog-agent" },
        { "key": "env", "value": "DD_API_KEY=<YOUR_DATADOG_API_KEY>" },
        { "key": "env", "value": "MESOS_SLAVE=true" }
      ],
      "forcePullImage": false
    }
  },
  "healthChecks": [
    {
      "protocol": "COMMAND",
      "command": { "value": "/probe.sh" },
      "gracePeriodSeconds": 300,
      "intervalSeconds": 60,
      "timeoutSeconds": 20,
      "maxConsecutiveFailures": 3
    }
  ],
  "portDefinitions": [
    { "port": 10000, "protocol": "tcp", "name": "default", "labels": {} },
    { "port": 10001, "protocol": "tcp", "labels": {} }
  ]
}

カスタム mesos_slave.d/conf.yaml を構成する場合を除き (通常は disable_ssl_validation:true を設定する必要があります)、エージェントのインストール後に必要な作業はありません。

収集データ

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

    logs_enabled: true
    
  2. Mesos のログの収集を開始するには、次の構成ブロックを mesos_slave.d/conf.yaml ファイルに追加します。

    logs:
      - type: file
        path: /var/log/mesos/*
        source: mesos
    

    path パラメーターの値を環境に合わせて変更するか、デフォルトの Docker stdout を使用します。

    logs:
      - type: docker
        source: mesos
    

    使用可能なすべての構成オプションの詳細については、sample mesos_slave.d/conf.yamlを参照してください。

  3. Agent を再起動します

Kubernetes 環境のログを有効にするには、Kubernetes ログ収集を参照してください。

検証

DC/OS

DC/OS Web UI の Services タブに、Datadog Agent が表示されます。Datadog で、メトリクスエクスプローラーを使用して mesos.slave を検索します。

Marathon

DC/OS を使用していない場合は、正常に実行中のアプリケーションの一覧に datadog-agent が表示されます。Datadog で、メトリクスエクスプローラーを使用して mesos.slave を検索します。

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

データセキュリティ

mesos.slave.cpus_percent
(gauge)
Percentage of allocated CPUs
Shown as percent
mesos.slave.cpus_total
(gauge)
Number of CPUs
mesos.slave.cpus_used
(gauge)
Number of allocated CPUs
mesos.slave.disk_percent
(gauge)
Percentage of allocated disk space
Shown as percent
mesos.slave.disk_total
(gauge)
Disk space
Shown as mebibyte
mesos.slave.disk_used
(gauge)
Allocated disk space
Shown as mebibyte
mesos.slave.executors_registering
(gauge)
Number of executors registering
mesos.slave.executors_running
(gauge)
Number of executors running
mesos.slave.executors_terminated
(gauge)
Number of terminated executors
mesos.slave.executors_terminating
(gauge)
Number of terminating executors
mesos.slave.frameworks_active
(gauge)
Number of active frameworks
mesos.slave.gpus_percent
(gauge)
Percentage of allocated GPUs
Shown as percent
mesos.slave.gpus_total
(gauge)
Number of GPUs
mesos.slave.gpus_used
(gauge)
Number of allocated GPUs
mesos.slave.invalid_framework_messages
(gauge)
Number of invalid framework messages
Shown as message
mesos.slave.invalid_status_updates
(gauge)
Number of invalid status updates
mesos.slave.mem_percent
(gauge)
Percentage of allocated memory
Shown as percent
mesos.slave.mem_total
(gauge)
Total memory
Shown as mebibyte
mesos.slave.mem_used
(gauge)
Allocated memory
Shown as mebibyte
mesos.slave.recovery_errors
(gauge)
Number of errors encountered during slave recovery
Shown as error
mesos.slave.tasks_failed
(count)
Number of failed tasks
Shown as task
mesos.slave.tasks_finished
(count)
Number of finished tasks
Shown as task
mesos.slave.tasks_killed
(count)
Number of killed tasks
Shown as task
mesos.slave.tasks_lost
(count)
Number of lost tasks
Shown as task
mesos.slave.tasks_running
(gauge)
Number of running tasks
Shown as task
mesos.slave.tasks_staging
(gauge)
Number of staging tasks
Shown as task
mesos.slave.tasks_starting
(gauge)
Number of starting tasks
Shown as task
mesos.slave.valid_framework_messages
(gauge)
Number of valid framework messages
Shown as message
mesos.slave.valid_status_updates
(gauge)
Number of valid status updates
mesos.state.task.cpu
(gauge)
Task cpu
mesos.state.task.disk
(gauge)
Task disk
Shown as mebibyte
mesos.state.task.mem
(gauge)
Task memory
Shown as mebibyte
mesos.stats.registered
(gauge)
Whether this slave is registered with a master
mesos.stats.system.cpus_total
(gauge)
Number of CPUs available
mesos.stats.system.load_15min
(gauge)
Load average for the past 15 minutes
mesos.stats.system.load_1min
(gauge)
Load average for the past minutes
mesos.stats.system.load_5min
(gauge)
Load average for the past 5 minutes
mesos.stats.system.mem_free_bytes
(gauge)
Free memory
Shown as byte
mesos.stats.system.mem_total_bytes
(gauge)
Total memory
Shown as byte
mesos.stats.uptime_secs
(gauge)
Slave uptime

ヘルプ

Mesos スレーブチェックには、イベントは含まれません。

ヘルプ

mesos_slave.can_connect
Returns CRITICAL if the Agent cannot connect to the Mesos slave metrics endpoint, otherwise OK.
Statuses: ok, critical

ヘルプ

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

その他の参考資料