All Products
Search
Document Center

Alibaba Cloud Service Mesh:SLO CRD field reference

Last Updated:Aug 21, 2026

Service Mesh (ASM) lets you define service level objectives (SLOs) and alert rules declaratively through a ServiceLevelObjective custom resource definition (CRD).

The field reference below is organized by hierarchy: metadata > spec > slos[] > sli / alerting.

YAML example

The following manifest defines an availability SLO for the httpbin service in the default namespace. The objective is 99.9% and the SLO takes effect over a 30-day period, with both page-level and ticket-level alerts.

The following table summarizes the key fields. For complete field descriptions, see CRD field reference.

Field

Description

namespace

Namespace of the custom resource. Must match the namespace of the target service.

service

Target service name.

period

Period of time during which the SLO takes effect. Valid values: 30d, 28d, 14d, 7d.

objective

Target percentage as a string. Valid range: (0, 100].

plugin

Defines the SLI type and options. Set id to availability or latency, then configure the corresponding options. See Plugin fields.

CRD field reference

metadata fields

Field

Type

Required

Description

Example

name

String

Yes

Custom resource name. Format: asm-slo-{namespace}-{service}.

asm-slo-default-httpbin

namespace

String

Yes

Custom resource namespace. Must match the namespace of the target service.

default

labels

Object

No

Auto-populated by the backend. Do not set manually. The system adds two labels: asm-target-namespace (the service namespace) and asm-target-service (the service name, same as spec.service).

labels:
asm-target-namespace: default
asm-target-service: httpbin

spec fields

Field

Type

Required

Description

Example

service

String

Yes

Target service name.

httpbin

period

String

Yes

Period of time during which the SLO takes effect. Valid values: 30d (30 days), 28d, 14d, 7d.

30d

labels

Object

No

Global label. Propagated to the labels field of every recording rule generated by the SLOs in this CRD.

labels:
global: "some-label"

slos

Array

Yes

One or more SLO definitions. At least one entry is required.

-

slos[] fields

Each entry in the slos array defines a single SLO with its objective, SLI configuration, and alerting rules.

Field

Type

Required

Description

Example

name

String

Yes

SLO name.

asm-slo

objective

String

Yes

Target percentage as a string parsable to a floating-point number. Valid range: (0, 100].

"99.9"

labels

Object

No

SLO-level label. Propagated to the labels field of every recording rule generated by this SLO.

labels:
recordlabel: aaa

sli

Object

Yes

Service level indicator (SLI) configuration. See sli fields.

-

alerting

Object

Yes

Alert rule configuration. See alerting fields.

-

sli fields

The sli object contains a single field: plugin.

Field

Type

Required

Description

Example

plugin

Object

Yes

Plugin configuration that defines how the SLI is measured. See Plugin fields.

-

Plugin fields

The plugin determines the SLI measurement type. Set id to select the plugin, then configure the corresponding options.

Field

Type

Required

Description

Example

id

String

Yes

Plugin type. Valid values: availability (service availability), latency (service latency).

latency

options

Map

Conditional

Plugin options. Required when the selected plugin has required fields. For example, latency requires bucket. See the options tables below.

options:
bucket: "300"

Options for availability

When id is set to availability, the following options are available:

Field

Type

Required

Description

Example

filter

String

No

PromQL label filter. Prometheus calculates metrics only for requests that match this filter.

request_protocol="http"

Options for latency

When id is set to latency, the following options are available:

Field

Type

Required

Description

Example

bucket

String

Yes

Latency objective, as a string parsable to an integer.

"300"

filter

String

No

PromQL label filter. Prometheus calculates metrics only for requests that match this filter.

request_protocol="http"

exclude_errors

Boolean

No

Whether to exclude error requests from latency calculations. Default: false. When true, requests with a 5XX response code are excluded. When false, all requests are included.

false

alerting fields

Field

Type

Required

Description

Example

name

String

Yes

Alert rule name.

asm-alert

labels

Map

No

Labels attached to the alert rule.

labels:
alertlabel: bbb

annotations

Map

No

Annotations attached to the alert rule.

annotations:
alertanno: ccc

pageAlert

Object

No

Page-level high-severity alert configuration. See pageAlert fields.

-

ticketAlert

Object

No

Ticket-level low-severity alert configuration. See ticketAlert fields.

-

pageAlert fields

Field

Type

Required

Description

Example

disable

Boolean

No

Whether to enable this alert. Default: true (enabled). Set to false to disable.

false

labels

Map

No

Labels attached to this alert.

labels:
pagelabel: ddd

annotations

Map

No

Annotations attached to this alert.

annotations:
pageanno: eee

ticketAlert fields

Field

Type

Required

Description

Example

disable

Boolean

No

Whether to enable this alert. Default: true (enabled). Set to false to disable.

false

labels

Map

No

Labels attached to this alert.

labels:
pagelabel: ddd

annotations

Map

No

Annotations attached to this alert.

annotations:
pageanno: eee