All Products
Search
Document Center

Alibaba Cloud Service Mesh:SLO CRD field reference

Last Updated:Mar 10, 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.

apiVersion: istio.alibabacloud.com/v1beta1
kind: ServiceLevelObjective
metadata:
  name: asm-slo-default-httpbin          # Format: asm-slo-{namespace}-{service}
  namespace: default                      # Must match the target service namespace
spec:
  service: httpbin                        # Target service name
  period: 30d                             # Period of time during which the SLO takes effect: 30d, 28d, 14d, or 7d
  labels:
    owner: "finance-team"                 # Global label, propagated to all generated recording rules
  slos:
  - name: asm-slo2                        # Unique SLO name within this CRD
    objective: "99.9"                     # Target percentage as a string
    labels:
      description: "service availability description"
    sli:
      plugin:
        id: availability                  # Plugin type: availability or latency
        options:                          # Plugin-specific options
          filter: request_protocol="http" # PromQL label filter
    alerting:
      name: asm-alert                     # Alert rule name
      labels:
        category: "availability"
      annotations:
        summary: "High error rate on requests"
      pageAlert:                          # High-severity, page-level alert
        labels:
          severity: "10"
      ticketAlert:                        # Low-severity, ticket-level alert
        labels:
          channel: "channel - call"

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

FieldDescription
namespaceNamespace of the custom resource. Must match the namespace of the target service.
serviceTarget service name.
periodPeriod of time during which the SLO takes effect. Valid values: 30d, 28d, 14d, 7d.
objectiveTarget percentage as a string. Valid range: (0, 100].
pluginDefines the SLI type and options. Set id to availability or latency, then configure the corresponding options. See Plugin fields.

CRD field reference

metadata fields

FieldTypeRequiredDescriptionExample
nameStringYesCustom resource name. Format: asm-slo-{namespace}-{service}.asm-slo-default-httpbin
namespaceStringYesCustom resource namespace. Must match the namespace of the target service.default
labelsObjectNoAuto-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

FieldTypeRequiredDescriptionExample
serviceStringYesTarget service name.httpbin
periodStringYesPeriod of time during which the SLO takes effect. Valid values: 30d (30 days), 28d, 14d, 7d.30d
labelsObjectNoGlobal label. Propagated to the labels field of every recording rule generated by the SLOs in this CRD.labels:
global: "some-label"
slosArrayYesOne 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.

FieldTypeRequiredDescriptionExample
nameStringYesSLO name.asm-slo
objectiveStringYesTarget percentage as a string parsable to a floating-point number. Valid range: (0, 100]."99.9"
labelsObjectNoSLO-level label. Propagated to the labels field of every recording rule generated by this SLO.labels:
recordlabel: aaa
sliObjectYesService level indicator (SLI) configuration. See sli fields.-
alertingObjectYesAlert rule configuration. See alerting fields.-

sli fields

The sli object contains a single field: plugin.

FieldTypeRequiredDescriptionExample
pluginObjectYesPlugin 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.

FieldTypeRequiredDescriptionExample
idStringYesPlugin type. Valid values: availability (service availability), latency (service latency).latency
optionsMapConditionalPlugin 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:

FieldTypeRequiredDescriptionExample
filterStringNoPromQL 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:

FieldTypeRequiredDescriptionExample
bucketStringYesLatency objective, as a string parsable to an integer."300"
filterStringNoPromQL label filter. Prometheus calculates metrics only for requests that match this filter.request_protocol="http"
exclude_errorsBooleanNoWhether 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

FieldTypeRequiredDescriptionExample
nameStringYesAlert rule name.asm-alert
labelsMapNoLabels attached to the alert rule.labels:
alertlabel: bbb
annotationsMapNoAnnotations attached to the alert rule.annotations:
alertanno: ccc
pageAlertObjectNoPage-level high-severity alert configuration. See pageAlert fields.-
ticketAlertObjectNoTicket-level low-severity alert configuration. See ticketAlert fields.-

pageAlert fields

FieldTypeRequiredDescriptionExample
disableBooleanNoWhether to enable this alert. Default: true (enabled). Set to false to disable.false
labelsMapNoLabels attached to this alert.labels:
pagelabel: ddd
annotationsMapNoAnnotations attached to this alert.annotations:
pageanno: eee

ticketAlert fields

FieldTypeRequiredDescriptionExample
disableBooleanNoWhether to enable this alert. Default: true (enabled). Set to false to disable.false
labelsMapNoLabels attached to this alert.labels:
pagelabel: ddd
annotationsMapNoAnnotations attached to this alert.annotations:
pageanno: eee