360 Secure SkillHub
360 安全技能中心

Slo Calculator

该 Skill 通过 Python 脚本计算 SLO/SLA 相关的错误预算、允许停机时长、燃烧率、可用性对比与九的可用性参考表,支持文本、JSON、Markdown 三种输出格式,并接受百分比或具名别名以及多种时长语法作为输入。

分类:数据
charlie-morrison
charlie-morrison
热度 30.48
最近更新 2026-05-11 17:42:36

安装

发给 Agent
帮我安装这个技能:npx secure-skills-cli add charlie-morrison/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