env['title'] += ':/' if fsname != '-': env['title'] += fsname.replace('_','/') # We look for only the usedBlocks_usedBlock datapoint # rrdfile = '' for fname in fs.getRRDNames(): if fname == 'usedBlocks_usedBlocks': rrdfile = fs.getRRDFileName(fname) break if rrdfile: rrdfile = '/opt/zenoss/perf/' + rrdfile cmd = [fname] + basicArgs(env) + args cmd.extend(['-E', '-l 0', '-u 100', '-r', '-W SunGard Availability Services']) # This smooths the trend lines, but makes the graph a little blurry. # Comment it out for crisper graph and stair-step trend lines. cmd.extend(['-N']) # Take blocks_used DEFS (datasets for differing time periods). # and calculate filesytem usage as a percentage into the fsu_x cdefs. # cmd.extend([ 'DEF:used_blocks_a=%s:ds0:AVERAGE:' % rrdfile, 'DEF:used_blocks_b=%s:ds0:AVERAGE:start=now-3d' % rrdfile, 'DEF:used_blocks_c=%s:ds0:AVERAGE:start=now-1w' % rrdfile,
inputFilesCount = len(lfiles) lcolor = len(colors) for i in range(lcount): stacks.append("AREA:c%d#%s::STACK" % (i, colors[i % lcolor])) x = 0 if lcount != count: stacks.append("AREA:c%d#%s" % (lcount, colors[x % lcolor])) x += 1 for i in range(lcount + 1, count): stacks.append("AREA:c%d#%s::STACK" % (i, colors[x % lcolor])) x += 1 cmd = [fname] + basicArgs(env) + args + defs + cdefs + [lcdef1, lcdef2] + stacks cmd.extend(["COMMENT:Interface Counts\: incoming=%s outgoing=%s\\c" % (lcount, ucount)]) if netIfRe: cmd.extend(['COMMENT:Filter="%s"\\c' % netIfRe]) cmd.extend(["COMMENT: \\l"]) cmd.extend( [ "GPRINT:lcdef2:LAST:%(upperLabel)s - Current\\: %%6.2lf %%s" % env, "GPRINT:lcdef2:AVERAGE:Average\\: %6.2lf %s", "GPRINT:lcdef2:MAX:Maximum\\: %6.2lf %s\\n", ] ) cmd.extend( [
inputFilesCount = len(lfiles) lcolor = len(colors) for i in range(lcount): stacks.append('AREA:c%d#%s::STACK' % (i, colors[i % lcolor])) x = 0 if lcount != count: stacks.append('AREA:c%d#%s' % (lcount, colors[x % lcolor])) x += 1 for i in range(lcount + 1, count): stacks.append('AREA:c%d#%s::STACK' % (i, colors[x % lcolor])) x += 1 cmd = [fname] + basicArgs(env) + args + defs + cdefs + [lcdef1, lcdef2 ] + stacks cmd.extend([ 'COMMENT:Interface Counts\: incoming=%s outgoing=%s\\c' % (lcount, ucount) ]) if netIfRe: cmd.extend(['COMMENT:Filter="%s"\\c' % netIfRe]) cmd.extend(['COMMENT: \\l']) cmd.extend([ 'GPRINT:lcdef2:LAST:%(upperLabel)s - Current\\: %%6.2lf %%s' % env, 'GPRINT:lcdef2:AVERAGE:Average\\: %6.2lf %s', 'GPRINT:lcdef2:MAX:Maximum\\: %6.2lf %s\\n' ]) cmd.extend([ 'GPRINT:lcdef1:LAST:%(lowerLabel)s - Current\\: %%6.2lf %%s' % env,
env['title'] += ':/' if fsname != '-': env['title'] += fsname.replace('_', '/') # We look for only the usedBlocks_usedBlock datapoint # rrdfile = '' for fname in fs.getRRDNames(): if fname == 'usedBlocks_usedBlocks': rrdfile = fs.getRRDFileName(fname) break if rrdfile: rrdfile = '/opt/zenoss/perf/' + rrdfile cmd = [fname] + basicArgs(env) + args cmd.extend(['-E', '-l 0', '-u 100', '-r', '-W SunGard Availability Services']) # This smooths the trend lines, but makes the graph a little blurry. # Comment it out for crisper graph and stair-step trend lines. cmd.extend(['-N']) # Take blocks_used DEFS (datasets for differing time periods). # and calculate filesytem usage as a percentage into the fsu_x cdefs. # cmd.extend([ 'DEF:used_blocks_a=%s:ds0:AVERAGE:' % rrdfile, 'DEF:used_blocks_b=%s:ds0:AVERAGE:start=now-3d' % rrdfile, 'DEF:used_blocks_c=%s:ds0:AVERAGE:start=now-1w' % rrdfile, 'DEF:used_blocks_d=%s:ds0:AVERAGE:start=now-1m' % rrdfile,