Skip to main content

baselines

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

Overview

Namebaselines
TypeResource
Idazure.monitor.baselines

Fields

The following fields are returned by SELECT queries:

Successful request to get the list of metric baseline values.

NameDatatypeDescription
idstringThe metric baseline Id.
namestringThe name of the metric for which the baselines were retrieved.
propertiesobjectThe metric baseline properties of the metric.
typestringThe resource type of the metric baseline resource.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
listselectresourceUrimetricnames, metricnamespace, timespan, interval, aggregation, sensitivities, $filter, resultTypeLists 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.

NameDatatypeDescription
resourceUristringThe identifier of the resource.
$filterstringThe $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' "
aggregationstringThe list of aggregation types (comma separated) to retrieve.
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.
resultTypestringAllows retrieving only metadata of the baseline. On data request all information is retrieved.
sensitivitiesstringThe list of sensitivities (comma separated) to retrieve.
timespanstringThe timespan of the query. It is a string with the following format 'startDateTime_ISO/endDateTime_ISO'.

SELECT examples

Lists the metric baseline values for a resource.

SELECT
id,
name,
properties,
type
FROM azure.monitor.baselines
WHERE resourceUri = '{{ resourceUri }}' -- 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 }}'
;