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

Class ZenAvailability

source code

           object --+            
                    |            
persistent.Persistent --+        
                        |        
           object --+   |        
                    |   |        
  ExtensionClass.Base --+        
                        |        
   Persistence.Persistent --+    
                            |    
                    ZenStatus --+
                                |
                               ZenAvailability

Persistent ExtensionClass

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

Inherited from Persistence.Persistent: __class_init__, __getattribute__, bobobase_modification_time, locked_in_version, modified_in_version

Inherited from persistent.Persistent: __delattr__, __getstate__, __new__, __reduce__, __setattr__, __setstate__

Inherited from persistent.Persistent (private): _p_activate, _p_deactivate, _p_delattr, _p_getattr, _p_invalidate, _p_setattr

Inherited from ExtensionClass.Base: __getnewargs__

Inherited from object: __hash__, __reduce_ex__, __repr__, __str__

Class Variables [hide private]

Inherited from ZenStatus: conversions

Properties [hide private]

Inherited from persistent.Persistent (private): _p_changed, _p_jar, _p_mtime, _p_oid, _p_serial, _p_state

Inherited from object: __class__

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