Day 048 / DevOps / Availability

Uptime SLA Calculator

View source ↗Scroll to explore ↓
Uptime SLA Calculator project cover
/ Overview

A dependency-free Python CLI that turns a time-based availability target into a downtime budget and compares supplied downtime using decimal arithmetic.

NameUptime SLA Calculator

ClientIndependent daily build

IndustriesInfrastructure and reliability tooling

DateDay 048 · October 17, 2026

/ Challenge

An availability percentage is easier to interpret when it is expressed as minutes in a defined measurement window. Rounding the displayed percentage can also hide a small overrun, so the budget comparison needs to remain separate from display formatting.

/ Provided services

Clear thinking.
Practical delivery.

01

Budget planning

Converts an explicit window and availability target into a simple time-based downtime allowance.

02

Boundary clarity

Uses the unrounded budget for status while formatting observed availability separately.

03

Documented scope

Explains that calendar assumptions, exclusions, partial failures and contract rules need separate treatment.

Uptime SLA Calculator feature visual
/ Solution

Uptime SLA Calculator uses decimal arithmetic to calculate window minutes, allowed downtime, remaining budget and observed availability. It accepts fractional day windows, compares downtime against the unrounded budget, and reports text or JSON with clear exit codes. It does not monitor services, merge incident intervals, evaluate contractual exclusions or calculate service credits.

/ Impact

Explicit measurement windows

Decimal downtime budgets

Observed availability

Remaining or exceeded minutes

Exact boundary classification

Bounded numeric validation

Text and JSON reports

Ten standard-library tests

/ Tech stack

Python standard library

Decimal, argparse and JSON provide the dependency-free CLI.

Defensive inputs

Rejects non-finite values, invalid windows, targets and downtime outside the measurement period.

Unittest

Ten tests cover exact boundaries, tiny overruns, full outages, fractional windows, input validation and CLI JSON exit behavior.

Next project

Proxmox Capacity Calculator

View case study ↗