Akamai offers a new platform to improve Linode metrics, with its Akamai Cloud Pulse (ACLP) service. While we transition to the new platform, you can select between it and our legacy solution to query your Linodes metrics.
This document covers how to implement the different metrics solutions for your Linodes, using the Linode API.
Metrics and alerts for Linodes are currently in limited availability and are rolling out gradually. If they are not visible for your Linode, access may not be available in your region yet.
ACLP vs. legacy metrics
Review the table below to see the differences in request formatting and response parsing before migrating to ACLP metrics.
For more information on the benefits of the new monitoring experience, see Transition to the new Metrics and Alerts.
| Parameter | Legacy metrics | ACLP metrics |
|---|---|---|
| Request Method and Body | GET request returning all available metrics at once | POST request with a JSON payload specifying desired metrics and aggregate_function (for example, min, max, avg)You can list multiple metrics objects in a single POST request or request the desired metric separately. |
| Timestamps | Milliseconds (for example,1771832400000) | Seconds (for example, 1771832400) |
| CPU usage unit | Unnormalized values (can exceed 100%) For example, 4 CPUs cores at 50% usage report 200% CPU usage. | Normalized values (0–100%) For example, 4 CPU cores at 50% usage report 50% CPU usage. |
| Network traffic unit | Bits per second (bps) | Kilobits per second (kbps) |
Query Linode metrics
These workflow cover querying for metrics that are available for Linodes.
To query ACLP metrics for Linodes, run a POST request containing a JSON payload with your desired metrics and an aggregate_function (like min, max, or avg). You can request multiple metrics in one payload or make separate requests for each.
Before you begin
Set up your authentication and learn what metrics are available to query for Linodes.
Get an access token
To use Monitor API operations, you need to generate a JWE-format token for inclusion in the call.
Follow the detailed guide to Authenticate Monitor API operations.
List Linodes' metrics
- Run the List metrics for a service type operation, targeting
linodeasserviceTypeto see the list of supported metrics for Linodes. - Review the
dataobjects in the response. Store the metric identifiers from themetricfields. This is how the metric is called out in other Monitor operations in the API, and you can use these identifiers to query individual metrics using the Get an entity's metrics operation:
The Get an entity's metrics operation uses a different URL and version from standard Linode API operations. Verify you're using the URL with the
monitor-api.linode.comhostname and includev2(orv2beta) as the version in the URL.
Query Linode's CPU usage
This workflow covers how to retrieve CPU usage metrics using the ACLP formatting.
-
Run the Get an entity's metric operation, targeting
linodeasserviceTypeand passing the storedtokenas a Bearer authorization header. Below is an example using cURL:curl --request POST \ --url https://monitor-api.linode.com/v2/monitor/services/linode/metrics \ --header 'accept: application/json' \ --header "authorization: Bearer abc123" \ --header 'content-type: application/json' \ --data ' -
In the request, apply your Linode's
idvalue inentity_idsand define thevm_cpu_usage_pctmetric and your desired aggregation. Configure the remaining fields as necessary and submit the request. For example:{ "entity_ids": [100213616], "group_by": ["entity_id"], "relative_time_duration": { "unit": "min", "value": 30 }, "metrics": [ { "aggregate_function": "avg", "name": "vm_cpu_usage_pct" } ] } -
Review the CPU usage metrics information in the response. Note that in
values, the timestamp is now in seconds and the CPU usage value is capped at 100%.{ "status": "success", "isPartial": false, "data": { "resultType": "matrix", "result": [ { "metric": { "entity_id": "100213616", "metric_name": "avg_vm_cpu_usage_pct" }, "values": [ [ 1786624782, "64" ] ] } ] }, "stats": { "executionTimeMsec": 7, "seriesFetched": "8" } }
Query Linode's inbound network traffic
This workflow covers how to retrieve inbound network traffic metrics using the ACLP formatting.
-
Run the Get an entity's metric operation, targeting
linodeasserviceTypeand passing the storedtokenas a Bearer authorization header. Below is an example using cURL:curl --request POST \ --url https://monitor-api.linode.com/v2/monitor/services/linode/metrics \ --header 'accept: application/json' \ --header "authorization: Bearer abc123" \ --header 'content-type: application/json' \ --data ' -
In the request:
-
Apply your Linode's
idvalue inentity_ids. -
Define the
vm_network_traffic_rate_kbpsmetric and your desired aggregation. -
Apply
filtersfor thepublicinandprivateinpatterns. -
Configure the remaining fields as necessary and submit the request.
For example:{ "entity_ids": [100213616], "group_by": ["entity_id"], "relative_time_duration": { "unit": "min", "value": 30 }, "filters": [ { "dimension_label": "pattern", "operator": "in", "value": "publicin,privatein" } ], "metrics": [ { "aggregate_function": "avg", "name": "vm_network_traffic_rate_kbps" } ] }
-
-
Review the inbound network traffic metrics information in the response. Note that in
values, the network unit is now in kilobits per second (kbps).{ "status": "success", "isPartial": false, "data": { "resultType": "matrix", "result": [ { "metric": { "entity_id": "100213616", "metric_name": "avg_vm_network_traffic_rate_kbps" }, "values": [ [ 1786624782, "4.926" ] ] } ] }, "stats": { "executionTimeMsec": 5, "seriesFetched": "4" } }
Query Linode's outbound network traffic
This workflow covers how to retrieve outbound network traffic metrics using the ACLP formatting.
-
Run the Get an entity's metric operation, targeting
linodeasserviceTypeand passing the storedtokenas a Bearer authorization header. Below is an example using cURL:curl --request POST \ --url https://monitor-api.linode.com/v2/monitor/services/linode/metrics \ --header 'accept: application/json' \ --header "authorization: Bearer abc123" \ --header 'content-type: application/json' \ --data ' -
In the request:
-
Apply your Linode's
idvalue inentity_ids. -
Define the
vm_network_traffic_rate_kbpsmetric and your desired aggregation. -
Apply
filtersfor thepublicoutandprivateoutpatterns. -
Configure the remaining fields as necessary and submit the request.
For example:{ "entity_ids": [100213616], "group_by": ["entity_id"], "relative_time_duration": { "unit": "min", "value": 30 }, "filters": [ { "dimension_label": "pattern", "operator": "in", "value": "publicout,privateout" } ], "metrics": [ { "aggregate_function": "avg", "name": "vm_network_traffic_rate_kbps" } ] }
-
-
Review the outbound network traffic metrics information in the response. Note that in
values, the network unit is now in kilobits per second (kbps).{ "status": "success", "isPartial": false, "data": { "resultType": "matrix", "result": [ { "metric": { "entity_id": "100213616", "metric_name": "avg_vm_network_traffic_rate_kbps" }, "values": [ [ 1786624782, "0.16037333333333334" ] ] } ] }, "stats": { "executionTimeMsec": 2, "seriesFetched": "4" } }
Query Linode's disk operations
This workflow covers how to retrieve Linode's disk operations metrics using the ACLP formatting.
-
Run the Get an entity's metric operation, targeting
linodeasserviceTypeand passing the storedtokenas a Bearer authorization header. Below is an example using cURL:curl --request POST \ --url https://monitor-api.linode.com/v2/monitor/services/linode/metrics \ --header 'accept: application/json' \ --header "authorization: Bearer abc123" \ --header 'content-type: application/json' \ --data ' -
In the request, apply your Linode's
idvalue inentity_idsand define thevm_disk_io_rate_iopsmetric and your desired aggregation. Configure the remaining fields as necessary and submit the the request. For example:{ "entity_ids": [100213616], "group_by": ["entity_id"], "relative_time_duration": { "unit": "min", "value": 30 }, "metrics": [ { "aggregate_function": "avg", "name": "vm_disk_io_rate_iops" } ] } -
Review the disk operations metrics information in the response.
{ "status": "success", "isPartial": false, "data": { "resultType": "matrix", "result": [ { "metric": { "entity_id": "100213616", "metric_name": "avg_vm_disk_io_rate_iops" }, "values": [ [ 1786624782, "0.6766666666666666" ] ] } ] }, "stats": { "executionTimeMsec": 3, "seriesFetched": "4" } }
