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

Type ZenAvailability

object --+            
         |            
      Base --+        
             |        
object --+   |        
         |   |        
Persistent --+        
             |        
    Persistent --+    
                 |    
         ZenStatus --+
                     |
                    ZenAvailability


Persistent ExtensionClass
Method Summary
  __init__(self, status)
  getAvail30(self)
get the 30 day rolling availability of this object
  getAvail30String(self)
get the 30 day rolling availability of this object
  getAvailPercent(self, start, end)
get availability for a date range as a float between 100.0 and 0.0
  getAvailPercentString(self, start, end)
get availability for a date range as a string for display
  getDownTime(self, start, end)
calculate the down time in seconds using start and end DateTime if no end is passed the current time is assumed
  getStatus(self)
get current down time in seconds
  getStatusString(self)
current down time in days hours or seconds
  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!!!
  reset(self)
reset the objects failure status
  _getDownTime(self, year, start, end)
check to see if we have year data for year and return it
  _getYearlyData(self, year)
get or create a YearlyDownTime object
Inherited from ZenStatus: color, setStatus
Inherited from Persistent: __class_init__, __getattribute__, bobobase_modification_time, locked_in_version, modified_in_version
Inherited from Persistent: __delattr__, __getstate__, __new__, __reduce__, __setattr__, __setstate__, _p_activate, _p_deactivate, _p_delattr, _p_getattr, _p_invalidate, _p_setattr
Inherited from Base: __getnewargs__
Inherited from object: __hash__, __reduce_ex__, __repr__, __str__

Class Variable Summary
Inherited from ZenStatus: conversions
Inherited from Persistent: _p_changed, _p_jar, _p_mtime, _p_oid, _p_serial, _p_state

Method Details

getAvail30(self)

get the 30 day rolling availability of this object

getAvail30String(self)

get the 30 day rolling availability of this object

getAvailPercent(self, start, end=None)

get availability for a date range as a float between 100.0 and 0.0

getAvailPercentString(self, start, end=None)

get availability for a date range as a string for display

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

getStatus(self)

get current down time in seconds
Overrides:
ZenModel.ZenStatus.ZenStatus.getStatus

getStatusString(self)

current down time in days hours or seconds
Overrides:
ZenModel.ZenStatus.ZenStatus.getStatusString

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!!!
Overrides:
ZenModel.ZenStatus.ZenStatus.incr

reset(self)

reset the objects failure status
Overrides:
ZenModel.ZenStatus.ZenStatus.reset

_getDownTime(self, year, start=None, end=None)

check to see if we have year data for year and return it

_getYearlyData(self, year)

get or create a YearlyDownTime object

Generated by Epydoc 2.1 on Thu Aug 16 09:55:13 2007 http://epydoc.sf.net