Package Products :: Package ZenUtils :: Module DaemonStats :: Class DaemonStats |
[hide private]
[frames] | no frames]

# Class DaemonStats

source code

    object --+
             |
            DaemonStats

Utility for a daemon to write out internal performance statistics

Instance Methods | [hide private]
__init__(self) | source code
config(self, name, monitor, thresholds, rrdCreateCommand=None) Initialize the object. | source code
rrdFile(self, type, cycleTime, name, minVal='U', maxVal='U') Create an RRD file if it does not exist. | source code
derive(self, name, cycleTime, value) Write a DERIVE value, return threshold events | source code
counter(self, name, cycleTime, value) Write a DERIVE(! NOT COUNTER!) value, return threshold events | source code
gauge(self, name, cycleTime, value) Write a gauge value, return threshold events | source code

Method Details | [hide private]

### __init__(self) (Constructor) | source code
Overrides: object.__init__ (inherited documentation)

### config(self, name, monitor, thresholds, rrdCreateCommand=None) | source code
Initialize the object. We could do this in __init__, but that would delay creation to after configuration time, which may run asynchronously with collection or heartbeats. By deferring initialization, this object implements the Null Object pattern until the application is ready to start writing real statistics.

### rrdFile(self, type, cycleTime, name, minVal='U', maxVal='U') | source code
Create an RRD file if it does not exist. Returns the basename of the rrdFile, suitable for checking thresholds.