Network Management

Understanding the calculation of Average Availability in Orion Platform

In this article, it will provide information on how Orion calculates the Average Availability on the Web Console, or in Reports.

First published date

4/27/2022 3:39 AM

Last published date

9/11/2023 9:49 AM

Overview

There are cases when you require to script or to understand how the underlying statistics collected within Orion derive the Average Availability

But using Average function/calculation against the "Availability" column will not yield the same results as Orion.

 

Product section

Orion Platform

Cause

Calculation of Availability not just involves the "Availability" column, but also involves the "Weight" column.
This column is important in the average availability calculation, as it determines whether an availability value is Current, Hourly, or Daily.
In short, if your Polling Interval for Node Status is 2 minutes, there will be a row of data that will be inserted into the database, which have a  "Weight" of 120s (2 minutes) every 2 minutes.
During nightly Database Maintenance (that happens at 2:15am system time by default), Availability records are summarised into Hourly (for records older than 7 days by default) and daily (older than 30 days by default) tables, and the Weight value is changed.

Resolution

The calculation used in Orion differs from the simple average calculation.
The typical average calculation is to sum up all the values within the filtered period and divide it by the number of data points used to sum.
e.g.
10, 11, 12, 56, 66
Average = (10+11+12+56+66) / 5 = 31

But the formula used by Orion (with reference to SWQL columns) is:
SUM(ResponseTimeHistory.Availability * ResponseTimeHistory.Weight) / SUM(ResponseTimeHistory.Weight) AS [Availability]