Skip to content
Tutorials Center
My learning

Topics

Lesson 9 of 37 ยท Monitoring Concepts

Availability, Uptime and SLA Math: Nines, Downtime Budgets, MTTR

Calculate availability and downtime budgets: the nines table, serial and parallel systems, MTBF and MTTR, error budgets, and how Zabbix and Nagios measure uptime for an SLA.

Monitoring produces a lot of numbers. The most requested one is probably availability: "Was the service up?" Managers want it as a percentage, customers want it in contracts, and engineers need to know how much failure they can afford. This lesson gives you the math, and then shows how Zabbix and Nagios compute and report availability.

All calculations run in the Python stand-ins below. Zabbix and Nagios themselves are not available on this site.

Availability as a percentage

Availability = uptime / (uptime + downtime), over a period.

A service that was down for 43.2 minutes in a 30-day month (43,200 minutes) has availability 1 - 43.2 / 43,200 = 99.9%. The famous "nines":

Availability Downtime per year Per 30-day month Per week
99% ("two nines") 3.65 days 7.2 hours 1.68 hours
99.9% 8.77 hours 43.2 minutes 10.1 minutes
99.95% 4.38 hours 21.6 minutes 5.0 minutes
99.99% 52.6 minutes 4.3 minutes 1.0 minute
99.999% ("five nines") 5.26 minutes 26 seconds 6 seconds

Each extra nine cuts the allowed downtime by 10 times and typically costs far more than 10 times as much to deliver.

Python Stand-in: the nines table

Press Run (or Ctrl + Enter) to see the result here.

Program input ยท what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

Computing availability from checks

Monitoring does not see continuous time; it sees samples. If you check every minute, a 90-second outage might show up as one or two failed checks. The common approximation is: availability = successful checks / total checks. Smaller intervals give a better estimate; very short outages between checks are invisible. Nagios computes availability from state changes (it knows exactly when the state flipped), which is more accurate than sampling. Zabbix computes SLAs from problem events of services, so the accuracy depends on how quickly triggers fire.

Python Stand-in: availability from samples

Press Run (or Ctrl + Enter) to see the result here.

Program input ยท what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

Combining components

Real services depend on several components. Two rules cover most cases.

In series (all must work): availability multiplies. A web app that needs a load balancer (99.99%), an app server (99.9%) and a database (99.9%) has 0.9999 x 0.999 x 0.999 = 99.79%. A chain is always weaker than its weakest link.

In parallel (any one is enough): unavailability multiplies. Two independent servers at 99% each give 1 - 0.01 x 0.01 = 99.99%. This is why redundancy is so powerful, provided that failures are truly independent (same rack, same power feed, or same bug breaks that assumption).

Python Stand-in: series and parallel

Press Run (or Ctrl + Enter) to see the result here.

Program input ยท what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

The result shows that after adding a second app server, the single database (99.9%) becomes the weakest part. Availability work is about finding the next weakest link.

MTBF, MTTR and the availability formula

  • MTBF (mean time between failures): average uptime between two failures.
  • MTTR (mean time to repair or recover): average time from the failure to the fixed state.
  • Availability = MTBF / (MTBF + MTTR).

Improving availability means failing less often (raise MTBF) or recovering faster (lower MTTR). In practice, cutting MTTR is easier: good alerts, runbooks and automation. Monitoring contributes directly: MTTD (time to detect) is part of MTTR, and a check every 5 minutes can add up to 5 minutes to every outage.

Python Stand-in: MTBF and MTTR

Press Run (or Ctrl + Enter) to see the result here.

Program input ยท what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

SLI, SLO and SLA

  • SLI (service level indicator): the measured value, for example "percent of HTTP checks that returned 200 within 500 ms".
  • SLO (objective): the target for the SLI, for example "99.9% over 30 days".
  • SLA (agreement): a contract that defines consequences (credits, penalties) when the SLO is missed.

The error budget is 100% minus the SLO. At 99.9% over 30 days the budget is 43.2 minutes; each outage spends it. When the budget is used up, teams freeze risky changes.

Be careful with definitions: what counts as "down"? Planned maintenance, partial degradation, and outages caused by the customer are commonly excluded or counted differently. Write these rules into the SLA and make the monitoring match them.

Measuring availability in Zabbix and Nagios

  • Zabbix has Services (Services menu): a tree of business services whose status is calculated from problems (matched by tags). An SLA object defines the schedule (24x7 or business hours), the SLO (for example 99.9%), the reporting period (daily, weekly, monthly...) and excluded downtime (maintenance windows). Services > SLA report shows the achieved percentage, uptime, downtime and the remaining error budget. Zabbix 7.0 also keeps a graph of Reports > Availability report per trigger. We cover this in the dashboards chapter.
  • Nagios has the Availability report (Reports) per host or service, with time spent in OK, WARNING, CRITICAL, UNKNOWN and "scheduled downtime". Scheduled downtime is Nagios's way to exclude planned work.

Both let you mark planned work so it does not count as an outage; see maintenance and dependencies.

Check your understanding

Quick check ยท 4 questions

of 4 answered You scored / 4 ยท perfect!

  1. 1. How much downtime does 99.9% availability allow in a 30-day month?

    0.1% of 43,200 minutes is 43.2 minutes.
  2. 2. Three components in series have availability 99.9% each. The total is about:

    0.999 x 0.999 x 0.999 = 0.997, about 99.7%.
  3. 3. Two independent servers at 99% in parallel give:

    Unavailability multiplies: 0.01 x 0.01 = 0.0001, so 99.99%.
  4. 4. What is an error budget?

    At a 99.9% SLO the error budget is 0.1% of the period.

Summary

  • Availability = uptime / total time; each extra nine means 10 times less downtime.
  • Series multiplies availabilities; parallel multiplies unavailabilities.
  • Availability = MTBF / (MTBF + MTTR); faster detection and recovery help most.
  • SLI measures, SLO targets, SLA contracts; the error budget is 1 - SLO.
  • Zabbix SLA reports and Nagios availability reports exclude planned downtime.

Next: Hosts, host groups and interfaces