Skip to main content

metrics

Creates, updates, deletes, gets or lists a metrics resource.

Overview

Namemetrics
TypeResource
Idlinode.monitor.metrics

Fields

The following fields are returned by SELECT queries:

Returns a paginated list of metric information.

NameDatatypeDescription
available_aggregate_functionsarrayAvailable aggregate functions for the metric. (example: increase)
dimensionsarrayDimensions for the metric.
is_alertablebooleanWhether the metric is alertable.
labelstringThe name of the metric. This is used for display purposes in Akamai Cloud Manager. (example: CPU Usage)
metricstringThe identifier for the metric. This is how the metric is called out in other Monitor operations in the API. (example: cpu_usage)
metric_typestringThe type of metric. A value of counter represents variable values and a set target for the count. A histogram represents the frequency distribution of data points across a continuous range of numerical values. A gauge represents the performance against a target goal, and summary presents and summarizes data from multiple sources. (counter, histogram, gauge, summary) (example: histogram)
scrape_intervalstringHow frequently a metric is scraped to gather data, using s for seconds, m for minutes, or h for hours. Set to 60s, the metric would be scraped every 60 seconds. Set to 2m, the scrape occurs every two minutes. (example: 60s)
unitstringThe unit of measurement for the metric. (%, Bytes, sec, bps, msec, Bps, KB, MB, GB, rate, percentile, ratio, OPS, IOPS) (example: Bps)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
listselectserviceTypeX-FilterBeta Returns metrics for a specific service type.

> 📘
>
> - This operation is beta. Call it using the v4beta path in its URL.
>
> - For more details on the metrics available for each service, see the Metrics reference.

Learn more...

Learn more...
readexecserviceType, relative_time_duration, metrics, entity_ids, absolute_time_durationBeta Returns metrics information for the individual entities within a specific service type. Thi operation also requires an authorization: Bearer token you've created for this serviceType.

> 📘
>
> - This operation uses a different URL and version from standard Linode API operations. Verify you're using the URL with the monitor-api.linode.com hostname and include v2beta as the version in the URL.
>
> - For more details on the metrics available for each service, see the Metrics reference.
create_tokenexecserviceType, entity_idsBeta Returns a token that authenticates requests for the entities within a specific service type. The token has a lifetime of six hours after you create it. For an example of the token generation process, see Authenticate Monitor API operations.

> 📘
>
> - This operation is beta. Call it using the v4beta path in its URL.
>
> - To see your currently supported services, run the List supported service types operation.
>
> - You also need read_only access to the scope for the specified serviceType.

Learn more...

Learn more...

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
serviceTypestringThe Akamai Cloud Computing service being monitored. To see your currently supported services, run the List supported service types operation and store the appropriate service_type.
X-FilterobjectSpecifies a JSON object to filter down the results. See Filtering and sorting for details. (example: {{X-Filter}})

SELECT examples

Beta Returns metrics for a specific service type.

> 📘
>
> - This operation is beta. Call it using the v4beta path in its URL.
>
> - For more details on the metrics available for each service, see the Metrics reference.

Learn more...

Learn more...

SELECT
available_aggregate_functions,
dimensions,
is_alertable,
label,
metric,
metric_type,
scrape_interval,
unit
FROM linode.monitor.metrics
WHERE serviceType = '{{ serviceType }}' -- required
AND X-Filter = '{{ X-Filter }}'
;

Lifecycle Methods

Beta Returns metrics information for the individual entities within a specific service type. Thi operation also requires an authorization: Bearer token you've created for this serviceType.

> 📘
>
> - This operation uses a different URL and version from standard Linode API operations. Verify you're using the URL with the monitor-api.linode.com hostname and include v2beta as the version in the URL.
>
> - For more details on the metrics available for each service, see the Metrics reference.

EXEC linode.monitor.metrics.read
@serviceType='{{ serviceType }}' --required
@@json=
'{
"entity_ids": "{{ entity_ids }}",
"filters": "{{ filters }}",
"group_by": "{{ group_by }}",
"metrics": "{{ metrics }}",
"time_granularity": "{{ time_granularity }}",
"relative_time_duration": "{{ relative_time_duration }}",
"absolute_time_duration": "{{ absolute_time_duration }}"
}'
;