Mesos/Marathon

Mesos is built using the same principles as the Linux kernel, only at a different level of abstraction. The Mesos kernel runs on every machine and provides applications (e.g., Hadoop, Spark, Kafka, Elasticsearch) with APIs for resource management and scheduling across entire datacenter and cloud environments. The Mesos metrics are divided into master and agent. Marathon is a production-grade container orchestration platform for Apache Mesos.

If Mesos and Marathon are installed in your environment, the Sysdig agent will automatically connect and start collecting metrics. You may need to edit the default entries to add a custom configuration if the default does not work. See the Default Configuration section, below.

This page describes the default configuration settings, how to edit the configuration to collect additional information, the metrics available for integration, and a sample result in the Sysdig Monitor UI.

Mesos/Marathon Setup

Both Mesos and Marathon will automatically expose all metrics. You do not need to add anything to the Mesos/Marathon instance.

Sysdig Agent Configuration

Review how to Edit dragent.yaml to Integrate or Modify Application Checks.

The Sysdig agent has different entries for mesos-master, mesos-slave and marathon in its configuration file. Default entries are present in Sysdig’s dragent.default.yaml file and collect all metrics for Mesos. For Marathon, it collects basic metrics. You may need add configuration to collect additional metrics.

Default Configuration

In the URLs for mesos-master and mesos-slave, {mesos_url} will be replaced with either the hostname of the auto-detected mesos master/slave (if auto-detection is enabled), or with an explicit value from mesos_state_uri otherwise.

In the URLs for marathon, {marathon_url} will be replaced with the hostname of the first configured/discovered Marathon framework.

For all Mesos and Marathon apps, {auth_token} will either be blank or an auto-generated token obtained via the /acs/api/v1/auth/login endpoint.

Mesos Master

app_checks:
  - name: mesos-master
    check_module: mesos_master
    interval: 30
    pattern:
      comm: mesos-master
    conf:
      url: "http://localhost:5050"
    auth_token: "{auth_token}"
    mesos_creds: "{mesos_creds}"

Mesos Agent

app_checks:

  - name: mesos-slave
    check_module: mesos_slave
    interval: 30
    pattern:
      comm: mesos-slave
    conf:
      url: "http://localhost:5051"
    auth_token: "{auth_token}"
    mesos_creds: "{mesos_creds}"

Marathon

app_checks:

  - name: marathon
    check_module: marathon
    interval: 30
    pattern:
      arg: mesosphere.marathon.Main
    conf:
      url: "{marathon_url}"
    auth_token: "{auth_token}"
    marathon_creds: "{marathon_creds}"

Remember! Never edit dragent.default.yaml directly; always edit dragent.yaml.

Marathon

Enable the flag full_metrics to collect all metrics for marathon.

The following additional metrics are collected with this configuration:

  • marathon.cpus

  • marathon.disk

  • marathon.instances

  • marathon.mem

app_checks:

  - name: marathon
    check_module: marathon
    interval: 30
    pattern:
      arg: mesosphere.marathon.Main
    conf:
      url: "{marathon_url}"
    auth_token: "{auth_token}"
    marathon_creds: "{marathon_creds}"

Metrics Available

See Mesos Master Metrics.

See Mesos Agent Metrics.

See Marathon Metrics.

Result in the Monitor UI

Mesos Master

Mesos Agent

Marathon