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.
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.
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
The following resources are available under both of the above routes: