Metrics Endpoint
This section describes the usage and specifics of the available metrics endpoint of the a9s Public API V1.
info
Before you can access any of the mentioned endpoints, you have to follow the steps mentioned in Accessing the a9s Public API.
Get Metrics
This request displays the metrics of the Service Instance.
Route
GET /v1/instances/:instance_id/metrics?quantity=x
:instance_idMUST be the ID of a previously provisioned Service Instance.quantityNumber of latest elements to be returned. If not set, all elements WILL be returned. If set, quantity MUST be greater than or equal to 1.
cURL
curl --insecure --header "Authorization: $(bearer_token)" \
"${url}/metrics?quantity=1"
Response
The response is a JSON that contains a collection of metrics DataPoints in Graphite format. For more details, see Graphite Metrics.
Body
For success responses, the body contains the collection of metrics DataPoints
which can be piped to a file.
Example
[
"keyvalue.0.system.cpu.error 0 1594380720",
"keyvalue.0.system.cpu0.user 894310 1594380720",
"keyvalue.0.system.cpu0.system 410430 1594380720",
"keyvalue.0.system.cpu0.idle 72292610 1594380720",
"keyvalue.0.system.load.load1 3542480 1594380720",
"keyvalue.0.system.load.load5 3152832 15943807720",
"keyvalue.0.system.load.load15 2358398 15943807720",
"keyvalue.0.system.memory.error 0 1594380720",
"keyvalue.0.system.memory.total 4136923136 1594380720",
"keyvalue.0.system.memory.used 3278594048 1594380720",
"keyvalue.0.system.memory.free 151093248 1594380720",
"keyvalue.0.system.memory.shared 21757952 1594380720",
"keyvalue.0.system.memory.buffers 137117696 1594380720",
"keyvalue.0.system.memory.cached 570118144 1594380720",
"keyvalue.0.system.swap.error 0 1594380720",
"keyvalue.0.system.swap.total 4136628224 1594380720",
"keyvalue.0.system.swap.used 0 1594380720",
"keyvalue.0.system.swap.free 4136628224 1594380720",
"keyvalue.0.system.disk.error 0 1594380720",
"keyvalue.0.system.disk.system.error 0 1594380720",
"keyvalue.0.system.disk.system.total 3103686656 1594380720",
"keyvalue.0.system.disk.system.used 1558130688 1594380720",
"keyvalue.0.system.disk.system.free 1369866240 1594380720",
"keyvalue.0.system.disk.ephemeral.error 0 1594380720",
"keyvalue.0.system.disk.ephemeral.total 6113067008 1594380720",
"keyvalue.0.system.disk.ephemeral.used 1042546688 1594380720",
"keyvalue.0.system.disk.ephemeral.free 4736393216 1594380720",
"keyvalue.0.system.disk.var_log.error 0 1594380720",
"keyvalue.0.system.disk.var_log.total 6113067008 1594380720",
"keyvalue.0.system.disk.var_log.used 1042546688 1594380720",
"keyvalue.0.system.disk.var_log.free 4736393216 1594380720",
"keyvalue.0.system.disk.tmp.error 0 1594380720",
"keyvalue.0.system.disk.tmp.total 6113067008 1594380720",
"keyvalue.0.system.disk.tmp.used 1042546688 1594380720",
"keyvalue.0.system.disk.tmp.free 4736393216 1594380720",
"keyvalue.0.system.disk.var_tmp.error 0 1594380720",
"keyvalue.0.system.disk.var_tmp.total 6113067008 1594380720",
"keyvalue.0.system.disk.var_tmp.used 1042546688 1594380720",
"keyvalue.0.system.disk.var_tmp.free 4736393216 1594380720",
"keyvalue.0.system.disk.home.error 0 1594380720",
"keyvalue.0.system.disk.home.total 3103686656 1594380720",
"keyvalue.0.system.disk.home.used 1558130688 1594380720",
"keyvalue.0.system.disk.home.free 1369866240 1594380720",
"keyvalue.0.system.disk.persistent.error 0 1594380720",
"keyvalue.0.system.disk.persistent.total 5148114944 1594380720",
"keyvalue.0.system.disk.persistent.used 10547200 1594380720",
"keyvalue.0.system.disk.persistent.free 4852461568 1594380720"
"keyvalue.0.parachute.error 0 1594380720",
"keyvalue.0.parachute.activated 1 1594380720",
"keyvalue.0.parachute.disk.ephemeral.error 0 1594380720",
"keyvalue.0.parachute.disk.ephemeral.total 6113067008 1594380720",
"keyvalue.0.parachute.disk.ephemeral.used 1068199936 1594380720",
"keyvalue.0.parachute.disk.ephemeral.used_percent 18 1594380720",
"keyvalue.0.parachute.disk.ephemeral.used_threshold 10 1594380720",
"keyvalue.0.parachute.disk.ephemeral.free 4710739968 1594380720",
"keyvalue.0.parachute.disk.ephemeral.activated 1 1594380720",
"keyvalue.0.parachute.disk.persistent.error 0 1594380720",
"keyvalue.0.parachute.disk.persistent.total 5148114944 1594380720",
"keyvalue.0.parachute.disk.persistent.used 10657792 1594380720",
"keyvalue.0.parachute.disk.persistent.used_percent 0 1594380720",
"keyvalue.0.parachute.disk.persistent.used_threshold 80 1594380720",
"keyvalue.0.parachute.disk.persistent.free 4852350976 1594380720",
"keyvalue.0.parachute.disk.persistent.activated 0 1594380720",
]
For error responses, the following fields are defined:
| Response Field | Type | Description |
|---|---|---|
error | string | A single word in camel case that uniquely identifies the error condition. |
description | string | A user-facing error message explaining why the request failed. |
Status
| Status Code | Description |
|---|---|
200 OK | If the request has been processed successfully. |
202 Accepted | The request has been accepted for processing, but the processing has not been completed. The request might or might not eventually be acted upon, as it might be disallowed when processing actually takes place. There is no facility for re-sending a status code from an asynchronous operation such as this. |
401 Unauthorized | The user does not have valid authentication credentials for the target resource. |
403 Forbidden | The user does not have the required right to do this request. |
404 Not Found | Entity not found. |
409 Conflict | There is already such action in progress. |
500 Internal Server Error | An unexpected error occurred while handling the request. |
502 Bad Gateway | An error occurred during upstream communication. |
504 Gateway Timeout | A timeout occurred during upstream communication. |