Package Products :: Package ZenModel :: Module ZenStatus :: Class ZenAvailability |
[hide private]
[frames] | no frames]

# Class ZenAvailability

source code

    Globals.Persistent --+
                         |
                 ZenStatus --+
                             |
                            ZenAvailability

Instance Methods | [hide private]
__init__(self, status=-1) | source code
incr(self) increment the failure time of a monitored object if we are in a new day since last failure move old day data to yearly data and reset for todays availability this must be called once a day to work correctly!!! | source code
reset(self) reset the objects failure status | source code
getStatusString(self) current down time in days hours or seconds | source code
getStatus(self) get current down time in seconds | source code
getAvailPercent(self, start, end=None) get availability for a date range as a float between 100.0 and 0.0 | source code
getAvailPercentString(self, start, end=None) get availability for a date range as a string for display | source code
getAvail30(self) get the 30 day rolling availability of this object | source code
getAvail30String(self) get the 30 day rolling availability of this object | source code
getDownTime(self, start, end=None) calculate the down time in seconds using start and end DateTime if no end is passed the current time is assumed | source code
_getDownTime(self, year, start=None, end=None) check to see if we have year data for year and return it | source code
_getYearlyData(self, year) get or create a YearlyDownTime object | source code
Inherited from `ZenStatus`: `color`, `setStatus`

Class Variables | [hide private]
Inherited from `ZenStatus`: `conversions`

Method Details | [hide private]

### __init__(self, status=-1) (Constructor) | source code
Overrides: ZenStatus.__init__

### incr(self) | source code
increment the failure time of a monitored object if we are in a new day since last failure move old day data to yearly data and reset for todays availability this must be called once a day to work correctly!!! Overrides: ZenStatus.incr

### reset(self) | source code
reset the objects failure status Overrides: ZenStatus.reset

### getStatusString(self) | source code
current down time in days hours or seconds Overrides: ZenStatus.getStatusString

### getStatus(self) | source code
get current down time in seconds Overrides: ZenStatus.getStatus