predictive_metrics
Creates, updates, deletes, gets or lists a predictive_metrics
resource.
Overview
Name | predictive_metrics |
Type | Resource |
Id | azure.monitor.predictive_metrics |
Fields
The following fields are returned by SELECT
queries:
- get
Successful request to get the list of metric values.
Name | Datatype | Description |
---|---|---|
data | array | the value of the collection. |
interval | string (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. |
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 | subscriptionId , resourceGroupName , autoscaleSettingName , aggregation | timespan , interval , metricnamespace , metricnames | 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. |
autoscaleSettingName | string | The autoscale setting name. |
resourceGroupName | string | The name of the resource group. The name is case insensitive. |
subscriptionId | string | The ID of the target subscription. |
interval | string | The 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 |
metricnames | string | The names of the metrics (comma separated) to retrieve. |
metricnamespace | string | Metric namespace to query metric definitions for. |
timespan | string | The timespan of the query. It is a string with the following format 'startDateTime_ISO/endDateTime_ISO'. |
SELECT
examples
- get
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 }}'
;