This page explains how to get started with metrics in DC/OS. A metrics pipeline is natively integrated with DC/OS and no additional setup is required.
Prerequisites:
- You must have the DC/OS CLI installed and be logged in as a superuser via the
dcos auth login
command.
-
Optional: Deploy a sample Marathon app for use in this quick start guide. If you already have tasks running on DC/OS, you can skip this setup step.
-
Create the following Marathon app definition and save as
test-metrics.json
. -
Deploy the app with the following CLI command:
-
-
To get the Mesos ID of the node that is running your app, run
dcos task
followed bydcos node
. For example:-
Running
dcos task
shows that host10.0.0.193
is running the Marathon tasktest-metrics.93fffc0c-fddf-11e6-9080-f60c51db292b
. -
Running
dcos node
shows that host10.0.0.193
has the Mesos ID7749eada-4974-44f3-aad9-42e2fc6aedaf-S1
.
-
-
View metrics.
-
Container metrics for a specific task
For an overview of the resource consumption for a specific container, execute the following command:
The output should resemble:
The metrics summary command displays a summary of raw and percentage utilization of CPU, Memory and Disk resources using the metrics documented in the metrics reference summary.
In particular, the following metrics and formula are used to compute the displayed values:
- CPU usage:
- Memory usage:
- Disk usage:
-