ajrbyers / mondroid

Simple monitoring system written in Python/Django using requests.
GNU General Public License v2.0
0 stars 0 forks source link

outage detection appears to be broken in general #4

Closed lsh-0 closed 9 years ago

lsh-0 commented 9 years ago

as a layman visitor to the dashboard I would expect to see recent outages, the current state of the website and how long it has been at this state at a glance because the dashboard is all about being spoon-fed information quickly

The dashboard is saying the current state of the site is down, with three outages reported. The site is up and those three outages appear to be the first three consecutive failures and no others ...

ajrbyers commented 9 years ago

I've found the logic that's the problem here and I'll fix it tomorrow :)

lsh-0 commented 9 years ago

this sort of information is derived from the data we already have in the db, have you considered replacing it with a function?

>>> downtime_between(now, then)
... [[<Check 2014-12-05 21:05>, <Check 2014-12-05 21:00>, <Check 2014-12-05 20:55> ...],
...  [<Check 2014-12-05 20:05>, <Check 2014-12-05 20:10>],
...  [...]]

and then the length of each downtime is the difference between the end and the start times.

ajrbyers commented 9 years ago

Outages are now detected and displayed based on the monitor current_state function.