Skip to main content

predictive_metric

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

Overview

Namepredictive_metric
TypeResource
Idazure.monitor.predictive_metric

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
dataarraythe value of the collection.
intervalstringThe 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
getselectresource_group_name, autoscale_setting_name, subscription_id, timespan, interval, metricNamespace, metricName, aggregationget 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. Required.
autoscale_setting_namestringThe autoscale setting name. Required.
intervalstringThe interval (i.e. timegrain) of the query. Required.
metricNamestringThe names of the metrics (comma separated) to retrieve. Special case: If a metricname itself has a comma in it then use %2 to indicate it. Eg: 'Metric,Name1' should be 'Metric%2Name1'. Required.
metricNamespacestringMetric namespace to query metric definitions for. Required.
resource_group_namestringThe name of the resource group. The name is case insensitive. Required.
subscription_idstring
timespanstringThe timespan of the query. It is a string with the following format 'startDateTime_ISO/endDateTime_ISO'. Required.

SELECT examples

get predictive autoscale metric future data.

SELECT
data,
interval,
metricName,
targetResourceId,
timespan
FROM azure.monitor.predictive_metric
WHERE resource_group_name = '{{ resource_group_name }}' -- required
AND autoscale_setting_name = '{{ autoscale_setting_name }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
AND timespan = '{{ timespan }}' -- required
AND interval = '{{ interval }}' -- required
AND metricNamespace = '{{ metricNamespace }}' -- required
AND metricName = '{{ metricName }}' -- required
AND aggregation = '{{ aggregation }}' -- required
;