baselines
Creates, updates, deletes, gets or lists a baselines resource.
Overview
| Name | baselines |
| Type | Resource |
| Id | azure.monitor.baselines |
Fields
The following fields are returned by SELECT queries:
- list
| Name | Datatype | Description |
|---|---|---|
id | string | The metric baseline Id. Required. |
name | string | The name of the metric for which the baselines were retrieved. Required. |
baselines | array | The baseline for each time series that was queried. Required. |
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. Required. |
namespace | string | The namespace of the metrics been queried. |
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. Required. |
type | string | The resource type of the metric baseline resource. Required. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
list | select | resource_uri | metricnames, metricnamespace, timespan, interval, aggregation, sensitivities, $filter, resultType | Lists the metric baseline values for a resource. |
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 |
|---|---|---|
resource_uri | string | The fully qualified Azure Resource manager identifier of the resource. Required. |
$filter | string | The $filter is used to reduce the set of metric data returned. Example: Metric contains metadata A, B and C. - Return all time series of C where A = a1 and B = b1 or b2 $filter=A eq 'a1' and B eq 'b1' or B eq 'b2' and C eq '*' - Invalid variant: $filter=A eq 'a1' and B eq 'b1' and C eq '*' or B = 'b2' This is invalid because the logical or operator cannot separate two different metadata names. - Return all time series where A = a1, B = b1 and C = c1: $filter=A eq 'a1' and B eq 'b1' and C eq 'c1' - Return all time series where A = a1 $filter=A eq 'a1' and B eq '' and C eq ''. Special case: When dimension name or dimension value uses round brackets. Eg: When dimension name is dim (test) 1 Instead of using $filter= "dim (test) 1 eq '' " use **$filter= "dim %2528test%2529 1 eq '' "** When dimension name is dim (test) 3 and dimension value is dim3 (test) val Instead of using $filter= "dim (test) 3 eq 'dim3 (test) val' " use $filter= "dim %2528test%2529 3 eq 'dim3 %2528test%2529 val' ". Default value is None. |
aggregation | string | The list of aggregation types (comma separated) to retrieve. Default value is None. |
interval | string | The interval (i.e. timegrain) of the query. Default value is None. |
metricnames | 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'. Default value is None. |
metricnamespace | string | Metric namespace that contains the requested metric names. Default value is None. |
resultType | string | Allows retrieving only metadata of the baseline. On data request all information is retrieved. Known values are: "Data" and "Metadata". Default value is None. |
sensitivities | string | The list of sensitivities (comma separated) to retrieve. Default value is None. |
timespan | string | The timespan of the query. It is a string with the following format 'startDateTime_ISO/endDateTime_ISO'. Default value is None. |
SELECT examples
- list
Lists the metric baseline values for a resource.
SELECT
id,
name,
baselines,
interval,
namespace,
timespan,
type
FROM azure.monitor.baselines
WHERE resource_uri = '{{ resource_uri }}' -- required
AND metricnames = '{{ metricnames }}'
AND metricnamespace = '{{ metricnamespace }}'
AND timespan = '{{ timespan }}'
AND interval = '{{ interval }}'
AND aggregation = '{{ aggregation }}'
AND sensitivities = '{{ sensitivities }}'
AND $filter = '{{ $filter }}'
AND resultType = '{{ resultType }}'
;