×
Community Blog Configure SLO for Application Service in Alibaba Cloud Service Mesh (2): SLO Definition in ASM

Configure SLO for Application Service in Alibaba Cloud Service Mesh (2): SLO Definition in ASM

Part 2 of this series explains how service level objectives (SLO) works in Alibaba Cloud Service Mesh (ASM).

Abstract: Part 2 of this series explains how service level objectives (SLO) works in Alibaba Cloud Service Mesh (ASM).

By Xining Wang (xining.wxn@alibaba-inc.com)

This is the second article in the series:

  1. Configure SLO for Application Service in Alibaba Cloud Service Mesh (1): SLO Overview
  2. Configure SLO for Application Service in Alibaba Cloud Service Mesh (2): SLO Definition in ASM
  3. Configure SLO for Application Service in Alibaba Cloud Service Mesh (3): Configure SLOs for Applications in ASM
  4. Configure SLO for Application Service in Alibaba Cloud Service Mesh (4): Import the Generated Rules to Prometheus to Execute SLO
  5. Configure SLO for Application Service in Alibaba Cloud Service Mesh (5): Use Grafana to View SLO

Alibaba Cloud Service Mesh (ASM) allows you to configure service level objectives (SLOs) and alert rules by creating custom resource definitions (CRDs). This simplifies your configuration process. This topic describes fields in an SLO CRD.

Sample Files

The following sample file shows you how to configure an SLO for the httpbin application service in the default namespace to specify the service availability. In the file, the objective is 99.9% and the period of time during which the SLO takes effect is 30 days. Two severity levels of alerts are configured: pageAlert and ticketAlert. Custom labels and annotations are added to alerts.

apiVersion: istio.alibabacloud.com/v1beta1
kind: ServiceLevelObjective
metadata:
  name: asm-slo-default-httpbin
  namespace: default # The namespace of the custom resources
spec:
  service: httpbin # The name of the target service
  period: 30d # SLO duration
  labels:
    owner: "finance-team"
  slos:
  - name: asm-slo2 # SLO name
    objective: "99.9" # The target value
    labels:
      description: "service availability description"
    sli:
      plugin:
        id: availability # The type of the plugin
        options: # Plugin options
          filter: request_protocol="http"
    alerting:
      name: asm-alert # The name of the alert rule
      labels:
        category: "availability"
      annotations:
        summary: "High error rate on requests"
      pageAlert:
        labels:
          severity: "10"
      ticketAlert:
        labels:
          channel: "channel - call"

When you customize a configuration file, you need to focus on the following fields:

namespace: The namespace to which the custom resource belongs, which is also the namespace where the application for which you want to configure an SLO resides.
service: The name of the application.
period: The period of time during which the SLO takes effect. The unit is d, which indicates days. Valid values: 30d, 28d, 14d, and 7d.
objective: The objective
plugin: id means the type of the plug-in. options mean the options of the plug-in. Skip this field if no option is available.

Please refer to the field details below to fill in other fields

Description of CRD fields

Refer to the meaning of each field in the following table:

Metadata Field

1

Spec Field

2

SLO Field

3

SLI Field

4

Plugin Field

5

  • The following table describes the options field when id is availability.

6

  • The following table describes the options field when id is latency.

7

Alerting Field Definition

8

pageAlert Field Definition

9

ticketAlert Field Definition

10

0 2 1
Share on

Xi Ning Wang(王夕宁)

56 posts | 8 followers

You may also like

Comments

Xi Ning Wang(王夕宁)

56 posts | 8 followers

Related Products