Skip to main content

app_cpu_percentage_metrics

Creates, updates, deletes, gets or lists an app_cpu_percentage_metrics resource.

Overview

Nameapp_cpu_percentage_metrics
TypeResource
Iddigitalocean.monitoring.app_cpu_percentage_metrics

Fields

The following fields are returned by SELECT queries:

The response will be a JSON object with a key called data and status.

NameDatatypeDescription
dataobject
statusstring (example: success)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
monitoring_get_app_cpupercentage_metricsselectapp_id, start, endapp_componentTo retrieve cpu percentage metrics for a given app, send a GET request to /v2/monitoring/metrics/apps/cpu_percentage.

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
app_idstringThe app UUID. (example: 2db3c021-15ad-4088-bfe8-99dc972b9cf6)
endstringUNIX timestamp to end metric window. (example: 1620705417)
startstringUNIX timestamp to start metric window. (example: 1620683817)
app_componentstringThe app component name. (example: sample-application)

SELECT examples

To retrieve cpu percentage metrics for a given app, send a GET request to /v2/monitoring/metrics/apps/cpu_percentage.

SELECT
data,
status
FROM digitalocean.monitoring.app_cpu_percentage_metrics
WHERE app_id = '{{ app_id }}' -- required
AND start = '{{ start }}' -- required
AND end = '{{ end }}' -- required
AND app_component = '{{ app_component }}';