Skip to content

MetricQuery🔗

Constructor🔗

MetricQuery()

Methods🔗

build🔗

Builds the object.

def build() -> googlecloudmonitoring.MetricQuery

alias_by🔗

Aliases can be set to modify the legend labels. e.g. {{metric.label.xxx}}. See docs for more detail.

def alias_by(alias_by: str) -> typing.Self

alignment_period🔗

Alignment period to use when regularizing data. Defaults to cloud-monitoring-auto.

def alignment_period(alignment_period: str) -> typing.Self

cross_series_reducer🔗

Reducer applied across a set of time-series values. Defaults to REDUCE_NONE.

def cross_series_reducer(cross_series_reducer: str) -> typing.Self

editor_mode🔗

def editor_mode(editor_mode: str) -> typing.Self

filters🔗

Array of filters to query data by. Labels that can be filtered on are defined by the metric.

def filters(filters: list[str]) -> typing.Self

graph_period🔗

To disable the graphPeriod, it should explictly be set to 'disabled'.

def graph_period(graph_period: str) -> typing.Self

group_bys🔗

Array of labels to group data by.

def group_bys(group_bys: list[str]) -> typing.Self

metric_kind🔗

def metric_kind(metric_kind: googlecloudmonitoring.MetricKind) -> typing.Self

metric_type🔗

def metric_type(metric_type: str) -> typing.Self

per_series_aligner🔗

Alignment function to be used. Defaults to ALIGN_MEAN.

def per_series_aligner(per_series_aligner: str) -> typing.Self

preprocessor🔗

Preprocessor is not part of the API, but is used to store the preprocessor and not affect the UI for the rest of parameters

def preprocessor(preprocessor: googlecloudmonitoring.PreprocessorType) -> typing.Self

project_name🔗

GCP project to execute the query against.

def project_name(project_name: str) -> typing.Self

query🔗

MQL query to be executed.

def query(query: str) -> typing.Self

value_type🔗

def value_type(value_type: str) -> typing.Self

view🔗

def view(view: str) -> typing.Self

See also🔗