Sorry if this has been discussed before, I tried searching thwack and couldn't find an answer to my question.
I need to calculate a node's availability as part of a SQL query I am writing. I am using the ResponseTime_Detail table to do so and averaging up the Availability column. I have found that the results within my query show a different percentage than what is displayed in the Availability Statistics resource on the Node Details view. The details view shows 96.575% for today whereas my query is showing 100% for today.
After looking through the database entries, I found that there was a gap of time missing in the ResponseTime table between 9:30 and 10:00 am this morning for this node. It turns out the node would have been in unreachable status during that time because the node it depended on was down for that period. There has been no other downtime for this node besides that time period.
So, my guess is that the availability statistics resource can somehow take the unreachable time into it's calculation, but I can't find what table that data would come from. Does anyone know how I write a query for node availability that will include the time it was unreachable?
Thanks.