360 Secure SkillHub
360 安全技能中心

Slo Calculator

核心功能:计算SLO/SLA相关的错误预算、允许停机时长、燃烧率、实际可用性,支持多周期计算、多窗口分析、指标对比及参考表生成。典型场景:运维人员制定SLO目标、监控错误预算消耗、分析燃烧率风险、验证SLA合规性。输入支持百分比、别名、指定周期时长;输出支持文本、JSON、Markdown格式,通过命令行调用。

charlie-morrison
charlie-morrison
热度 50.71
最近更新 2026-05-11 17:42:36
分类:数据依赖:代码执行应用场景:数据处理 / DevOps / 报告撰写

安装技能

复制下面的话术发给你的 Agent,它会通过 secure-skills 检索并安装该技能。

执行命令安装此 skill: npx secure-skills-cli add slo-calculator
Metadata
name
slo-calculator
description
Calculate SLO/SLA error budgets, allowed downtime, burn rates, and uptime metrics. Use when asked about SLO targets, error budgets, uptime calculations, nines of availability, burn rate analysis, or SLA compliance. Triggers on "SLO", "SLA", "error budget", "uptime", "nines", "availability", "downtime budget", "burn rate".

SLO/Error Budget Calculator

Calculate uptime targets, allowed downtime, error budgets, and burn rates for SLO/SLA management.

Error Budget

# All periods
python3 scripts/slo.py budget 99.9

# Specific periods
python3 scripts/slo.py budget 99.9 month week day

# Named aliases
python3 scripts/slo.py budget three-nines

Burn Rate

# Consumed 15m downtime in first 15 days of month
python3 scripts/slo.py burn 99.9 15m --period month --elapsed 15d

# Simple: consumed 2h this month
python3 scripts/slo.py burn 99.9 2h

Compare Targets

python3 scripts/slo.py compare 99 99.9 99.99 99.999 --period month

Observed Uptime

# From downtime
python3 scripts/slo.py uptime --downtime 45m --period month

# From uptime
python3 scripts/slo.py uptime --uptime-seconds 2589300 --period month

Multi-Window Analysis

python3 scripts/slo.py multi-window 99.9 month:15m week:3m day:30s

Reference Table

python3 scripts/slo.py table
python3 scripts/slo.py table --period year

Output Formats

All commands support --format text|json|markdown:

python3 scripts/slo.py budget 99.9 -f json
python3 scripts/slo.py table -f markdown

Duration Syntax

Durations use: 30s, 5m, 2h, 1d, 2h30m, 1d12h. Raw seconds also accepted.

SLO Aliases

  • 99, 99.9, 99.95, 99.99, 99.999 — direct percentages
  • two-nines, three-nines, four-nines, five-nines — named aliases