Home

/apps/{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}
Path parameters

Name

Type

Description

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
Response body

Name

Type

Description

appId

string

App ID

unravel_metric_id

integer

Metric ID

system

string

entity_id

string

entity_name

string

host_name

string

sampleCount

integer

sum

integer

min

integer

max

integer

avg

integer

ts

integer

endTs

integer

unit

string

Examples

Request:

curl -X GET "http://myserver.com:3000/api/v1/apps/20190626T032742Z--6535643260096439568/resource_usage?metric_id=138" -H "accept: application/json" -H  "Authorization: JWT token"

Response body:

[
   {
     "appId":"20190626T032742Z--6535643260096439568",
     "unravel_metric_id":138,
     "system":"mr",
     "entity_id":"a_1",
     "entity_name":"a_1",
     "host_name":"myserver.com",
     "sampleCount":2,
     "sum":772329472,
     "min":384274432,
     "max":388055040,
     "avg":386164736,
     "ts":1553500850000,
     "endTs":1553500860000,
     "unit":"BYTES"
   }
]