Skip to content

Latest commit

 

History

History
60 lines (40 loc) · 1.87 KB

metrics-api.md

File metadata and controls

60 lines (40 loc) · 1.87 KB
post_title feature_maturity menu_order
Metrics API
preview
1

You can use the Metrics API to periodically poll for data about your cluster, hosts, containers, and applications. You can then pass this data to a third party service of your choice to achieve informative charts, dashboards, and alerts.

The Metrics API is backed by the DC/OS Metrics component, which runs on all nodes in the cluster.

Routes

From within the cluster, you can access by using this path, where <resource-path> is the Metrics API resource path. This method requires SSH access to your cluster.

http://localhost:61001/system/v1/metrics/v0/<resource-path>

For example, to view host-level metrics, run this command from your agent node:

curl -s http://localhost:61001/system/v1/metrics/v0/node | jq

From outside of the cluster, you can access by using this path, where <resource-path> is the Metrics API resource path.

http://<cluster-url>/system/v1/agent/{agent_id}/metrics/v0/<resource-path>

For more examples, see the Metrics Quick Start Guide.

Format

The Metrics API request and response bodies are formatted in JSON.

Requests must include the accept header:

Accept: application/json

Responses will include the content type header:

Content-Type: application/json

Resources

The following resources are available under both of the above routes:

Loading docs...