observability-manage-slos
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseService-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
undefinedSLO操作通过Kibana API执行。可使用API密钥或基础认证进行身份验证:
bash
undefinedAPI 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类型
| Type | API value | Use case |
|---|---|---|
| Custom KQL | | Raw logs — good/total using KQL queries |
| Custom metric | | Metric fields — equations with aggregations |
| Timeslice metric | | Metric fields — per-slice threshold check |
| Histogram metric | | Histogram fields — range/value_count |
| APM latency | | APM — latency threshold |
| APM availability | | APM — success rate |
| Synthetics availability | | Synthetics monitors — uptime percentage |
| 类型 | API值 | 使用场景 |
|---|---|---|
| 自定义KQL | | 原始日志 — 使用KQL查询统计正常/总请求数 |
| 自定义指标 | | 指标字段 — 带聚合运算的等式 |
| 时间切片指标 | | 指标字段 — 按切片检查阈值 |
| 直方图指标 | | 直方图字段 — 范围/值计数运算 |
| APM延迟 | | APM — 延迟阈值监控 |
| APM可用性 | | APM — 成功率统计 |
| 合成监控可用性 | | 合成监控器 — 正常运行时间百分比统计 |
Guidelines
注意事项
- is a decimal between 0 and 1 (for example
objective.targetfor 99.5%).0.995 - Timeslice metric indicators require .
budgetingMethod: "timeslices" - Updating an SLO resets the underlying transform — historical data is recomputed.
- The cluster needs nodes with both and
transformroles.ingest - Use when an SLO is stuck or after index mapping changes.
POST .../slos/{id}/_reset - 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 manually.
groupBy - Burn rate alert rules are not auto-created using the API — set them up separately.
- 是0到1之间的小数(例如
objective.target代表99.5%)。0.995 - 时间切片指标需设置。
budgetingMethod: "timeslices" - 更新SLO会重置底层的转换任务 — 历史数据将被重新计算。
- 集群需要同时具备和
transform角色的节点。ingest - 当SLO卡住或索引映射变更后,使用操作。
POST .../slos/{id}/_reset - 按分组创建的SLO会为每个唯一值生成一个实例 — 避免使用高基数字段。
- 合成监控SLO会按监控器和位置自动分组;请勿手动设置。
groupBy - 燃烧速率告警规则不会通过API自动创建 — 需单独设置。