Skip to main content

predictive_metrics

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

Overview

Namepredictive_metrics
TypeResource
Idazure.monitor.predictive_metrics

Fields

The following fields are returned by SELECT queries:

Successful request to get the list of metric values.

NameDatatypeDescription
dataarraythe value of the collection.
intervalstring (duration)The interval (window size) for which the metric data was returned in. This may be adjusted in the future and returned back from what was originally requested. This is not present if a metadata request was made.
metricNamestringThe metrics being queried
targetResourceIdstringresource of the predictive metric.
timespanstringThe timespan for which the data was retrieved. Its value consists of two datetimes concatenated, separated by '/'. This may be adjusted in the future and returned back from what was originally requested.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectsubscriptionId, resourceGroupName, autoscaleSettingName, aggregationtimespan, interval, metricnamespace, metricnamesget predictive autoscale metric future data

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
aggregationstringThe list of aggregation types (comma separated) to retrieve.
autoscaleSettingNamestringThe autoscale setting name.
resourceGroupNamestringThe name of the resource group. The name is case insensitive.
subscriptionIdstringThe ID of the target subscription.
intervalstringThe interval (i.e. timegrain) of the query in ISO 8601 duration format. Defaults to PT1M. Special case for 'FULL' value that returns single datapoint for entire time span requested. Examples: PT15M, PT1H, P1D, FULL
metricnamesstringThe names of the metrics (comma separated) to retrieve.
metricnamespacestringMetric namespace to query metric definitions for.
timespanstringThe timespan of the query. It is a string with the following format 'startDateTime_ISO/endDateTime_ISO'.

SELECT examples

get predictive autoscale metric future data

SELECT
data,
interval,
metricName,
targetResourceId,
timespan
FROM azure.monitor.predictive_metrics
WHERE subscriptionId = '{{ subscriptionId }}' -- required
AND resourceGroupName = '{{ resourceGroupName }}' -- required
AND autoscaleSettingName = '{{ autoscaleSettingName }}' -- required
AND aggregation = '{{ aggregation }}' -- required
AND timespan = '{{ timespan }}'
AND interval = '{{ interval }}'
AND metricnamespace = '{{ metricnamespace }}'
AND metricnames = '{{ metricnames }}'
;