predictive_metric
Creates, updates, deletes, gets or lists a predictive_metric resource.
Overview
| Name | predictive_metric |
| Type | Resource |
| Id | azure.monitor.predictive_metric |
Fields
The following fields are returned by SELECT queries:
- get
| Name | Datatype | Description |
|---|---|---|
data | array | the value of the collection. |
interval | string | 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. |
metricName | string | The metrics being queried. |
targetResourceId | string | resource of the predictive metric. |
timespan | string | The 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:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | resource_group_name, autoscale_setting_name, subscription_id, timespan, interval, metricNamespace, metricName, aggregation | get 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.
| Name | Datatype | Description |
|---|---|---|
aggregation | string | The list of aggregation types (comma separated) to retrieve. Required. |
autoscale_setting_name | string | The autoscale setting name. Required. |
interval | string | The interval (i.e. timegrain) of the query. Required. |
metricName | string | The 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. |
metricNamespace | string | Metric namespace to query metric definitions for. Required. |
resource_group_name | string | The name of the resource group. The name is case insensitive. Required. |
subscription_id | string | |
timespan | string | The timespan of the query. It is a string with the following format 'startDateTime_ISO/endDateTime_ISO'. Required. |
SELECT examples
- get
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
;