Package Products :: Package ZenRRD :: Module RRDUtil
[hide private]
[frames] | no frames]

Module RRDUtil

source code

Classes [hide private]
RRDUtil
Wrapper class around rrdtool
Functions [hide private]
number or string
_checkUndefined(x)
Sanity check on the min, max values
source code
 
convertToRRDTime(val)
Convert any value that is passed in to a string that is acceptable to use for RRDtool's start and end parameters.
source code
 
fixMissingRRDs(gopts)
Parses a list of RRDtool gopts for DEFs.
source code
 
fixRRDFilename(filename)
Attempting to render a graph containing a DEF referencing a non-existent filename will cause the entire graph to fail to render.
source code
 
read(path, consolidationFunction, start, end) source code
Variables [hide private]
  __doc__ = """RRDU...
  log = logging.getLogger("zen.RRDUtil")
  EMPTY_RRD = zenPath('perf', 'empty.rrd')
Function Details [hide private]

_checkUndefined(x)

source code 

Sanity check on the min, max values

Parameters:
  • x (number) - RRD min or max value
Returns: number or string
Either the number or 'U' (for undefined)

convertToRRDTime(val)

source code 

Convert any value that is passed in to a string that is acceptable to use
for RRDtool's start and end parameters. Raises ValueError if this is not
possible.

See the AT-STYLE TIME SPECIFICATION and TIME REFERENCE SPECIFICATION
sections of the following document.

    http://oss.oetiker.ch/rrdtool/doc/rrdfetch.en.html

Note: Currently this method is only fixing floats by turning them into
      strings with no decimal places.

fixMissingRRDs(gopts)

source code 

Parses a list of RRDtool gopts for DEFs. Runs all of the filenames referenced by those DEFs through the fixRRDFilename method to make sure that they will exist and not cause the rendering to fail.

fixRRDFilename(filename)

source code 

Attempting to render a graph containing a DEF referencing a non-existent filename will cause the entire graph to fail to render. This method is a helper to verify existence of an RRD file. If the file doesn't exist, a placeholder RRD filename with no values in it will be returned instead.


Variables Details [hide private]

__doc__

Value:
"""RRDUtil

Wrapper routines around the rrdtool library.
"""