observability-manage-slos

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Service-Level Objectives (SLOs)

服务水平目标(SLO)

Create and manage SLOs in Elastic Observability. SLOs track service performance against measurable targets using service-level indicators (SLIs) computed from Elasticsearch data.
在Elastic Observability中创建和管理SLO。SLO利用从Elasticsearch数据计算得出的服务水平指标(SLI),对照可衡量的目标跟踪服务性能。

Authentication

身份验证

SLO operations go through the Kibana API. Authenticate with either an API key or basic auth:
bash
undefined
SLO操作通过Kibana API执行。可使用API密钥或基础认证进行身份验证:
bash
undefined

API key

API key

curl -H "Authorization: ApiKey <base64-encoded-key>" -H "kbn-xsrf: true" <KIBANA_URL>/api/observability/slos
curl -H "Authorization: ApiKey <base64-encoded-key>" -H "kbn-xsrf: true" <KIBANA_URL>/api/observability/slos

Basic auth

Basic auth

curl -u "$KIBANA_USER:$KIBANA_PASSWORD" -H "kbn-xsrf: true" <KIBANA_URL>/api/observability/slos

For non-default spaces, prefix the path: `/s/<space_id>/api/observability/slos`.

Include `kbn-xsrf: true` on all POST, PUT, and DELETE requests.
curl -u "$KIBANA_USER:$KIBANA_PASSWORD" -H "kbn-xsrf: true" <KIBANA_URL>/api/observability/slos

对于非默认空间,需在路径前添加前缀:`/s/<space_id>/api/observability/slos`。

所有POST、PUT和DELETE请求都需包含`kbn-xsrf: true`头信息。

SLI Types

SLI类型

TypeAPI valueUse case
Custom KQL
sli.kql.custom
Raw logs — good/total using KQL queries
Custom metric
sli.metric.custom
Metric fields — equations with aggregations
Timeslice metric
sli.metric.timeslice
Metric fields — per-slice threshold check
Histogram metric
sli.histogram.custom
Histogram fields — range/value_count
APM latency
sli.apm.transactionDuration
APM — latency threshold
APM availability
sli.apm.transactionErrorRate
APM — success rate
Synthetics availability
sli.synthetics.availability
Synthetics monitors — uptime percentage
类型API值使用场景
自定义KQL
sli.kql.custom
原始日志 — 使用KQL查询统计正常/总请求数
自定义指标
sli.metric.custom
指标字段 — 带聚合运算的等式
时间切片指标
sli.metric.timeslice
指标字段 — 按切片检查阈值
直方图指标
sli.histogram.custom
直方图字段 — 范围/值计数运算
APM延迟
sli.apm.transactionDuration
APM — 延迟阈值监控
APM可用性
sli.apm.transactionErrorRate
APM — 成功率统计
合成监控可用性
sli.synthetics.availability
合成监控器 — 正常运行时间百分比统计

Guidelines

注意事项

  • objective.target
    is a decimal between 0 and 1 (for example
    0.995
    for 99.5%).
  • Timeslice metric indicators require
    budgetingMethod: "timeslices"
    .
  • Updating an SLO resets the underlying transform — historical data is recomputed.
  • The cluster needs nodes with both
    transform
    and
    ingest
    roles.
  • Use
    POST .../slos/{id}/_reset
    when an SLO is stuck or after index mapping changes.
  • Group-by SLOs create one instance per unique value — avoid high-cardinality fields.
  • Synthetics SLOs are auto-grouped by monitor and location; do not set
    groupBy
    manually.
  • Burn rate alert rules are not auto-created using the API — set them up separately.
  • objective.target
    是0到1之间的小数(例如
    0.995
    代表99.5%)。
  • 时间切片指标需设置
    budgetingMethod: "timeslices"
  • 更新SLO会重置底层的转换任务 — 历史数据将被重新计算。
  • 集群需要同时具备
    transform
    ingest
    角色的节点。
  • 当SLO卡住或索引映射变更后,使用
    POST .../slos/{id}/_reset
    操作。
  • 按分组创建的SLO会为每个唯一值生成一个实例 — 避免使用高基数字段。
  • 合成监控SLO会按监控器和位置自动分组;请勿手动设置
    groupBy
  • 燃烧速率告警规则不会通过API自动创建 — 需单独设置。