fzaninotto/uptime — pull request #42 by fzaninotto (2012-10-19 13:34:00+00:00)
Title: [WIP] Store outage intervals

The calculation of availability in checks is wrong. Uptime currently divides the number of up checks by the total number of checks over a period of time to get an average availability. But if the periodicity of pings varies during this period, the calculation is wrong. If the check is paused during this period, the calculation is wrong.

Similarly, the calculation of availability in tags is wrong, too. Uptime does an average of the availability of all the checks of a tag, while a tag should be considered down when either one of its check is down.

Lastly, the dashboards give too much text data and not enough data visualisation. With several dozen checks, it gets impossible to detect outages or abnormal behavior.

The solution : display uptime measurements as a bar, with outages being shown as red parts in these bars. Much more readable, much more exact as far as availability calculation is concerned.

The only thing is, it requires a *major* refactoring and a boost in performance - which probably requires switching from MapReduce to the new Mongo aggregation framework.