Skip to main content

Snowflake Documentation

GET /apps/{app_id}/resource_usage
New API: /apps/{clusterUid}/{app_id}/resource_usage

Gets an array of resource usage metrics for a given application.

Request
GET http://<unravel-host>:3000/api/v1/apps/{app_id}/resource_usage?metric_id={metric_id}&attempt_id={attempt_id}
Path parameters

Name

Type

Description

clusterUid

string

Cluster unique ID

app_id

string

App ID

Query parameters

Required parameters are highlighted.

Name

Type

Description

metric_id

string

Metric ID

Valid values are:

115: gcLoad
125: maxHeap
126: usedHeap
134: processCpuLoad
135: systemCpuLoad
137: availableMemory
138: vmRss

attempt_id

string

Attempt ID

Examples

Request:

curl -X GET -H "Authorization: JWT <token>"-H "Accept: application/json" http://my_server.unraveldata.com:3000/api/v1/apps/default/application_1648561667886_0018/resource_usage?metric_id=138&attempt_id=1

Response body:

  [{"appId":"application_1648115466090_0017","unravel_metric_id":138,"system":"spark","entity_id":"driver","entity_name":"driver","host_name":"172.36.25.28","sampleCount":1,"sum":617910272,"min":617910272,"max":617910272,"avg":617910272,"ts":1648206405000,"endTs":1648206435000,"unit":"BYTES"},{"appId":"application_1648115466090_0017","unravel_metric_id":138,"system":"spark","entity_id":"driver","entity_name":"driver","host_name":"172.36.25.28","sampleCount":1,"sum":646553600,"min":646553600,"max":646553600,"avg":646553600,"ts":1648206435000,"endTs":1648206440000,"unit":"BYTES"}]