# $Id: oracle.cvu,v 1.2 2008/12/09 16:36:07 ksb Exp $ # # $Check: perl -c %f && /opt/peg/bin/rrds -S -c %f /dev/null && echo "sane" # $Compile(*): /opt/peg/bin/rrds -c %f %s # CVU configuration file for oracle stats # # how to present different data sources and build the RRD package PEG::CVU; # our so we're in scope for the above package our($version); # a version string from our conf mgmt sys our(%ds); # data sources; see below for format our(%cdef); # CDEFs; see below for format our(%maps); # maps; see below for format our($defmap); # default map to render our(@overview); # maps to render in "list context" our(@detailmaps); # maps to render for $drilldown/$ask_for_me our(@rra); # RRA parameters our(@init_params); # Default rrdgraph parameter prefix our($rrdcrit); # R.E. criteria to match an RRD we'll render our($timebox); # ref to a function to filter start/end our($content); # content type our renderer emits our($renderer); # render agent path, in local http instance $version = '$Id: oracle.cvu,v 1.2 2008/12/09 16:36:07 ksb Exp $'; # data sources: # "dsname" => [line color, area color, descr, build string, update letter] # colors default to "000000" if undef %ds = ( "usercall" => ['33cc33', undef, "usercalls", "COUNTER:300:0:U", 'u'], "cpu" => ['cc6600', "cc6600", "CPU%", "COUNTER:300:0:U", 'c'], "physread" => ['33cc66', undef, "physical reads", "COUNTER:300:0:U", 'r'], "physwrite" => ['6666cc', undef, "physical writes", "COUNTER:300:0:U", 'w'], "lgetblock" => ['33cccc', undef, "logical gets", "COUNTER:300:0:U", 'b'], "lgetcons" => ['cc33cc', undef, "logicals cons", "COUNTER:300:0:U", 'l'], "redo" => ['cc3333', undef, "redo events", "COUNTER:300:0:U", 'd'], "sqlparse" => ['cccc33', undef, "SQL parse", "COUNTER:300:0:U", 'p'], ); # CDEFs: # if we can't find a ds in %ds, we look here # "cdef" => [RPN definition, line color, area color, descr] # colors default to "000000" if undef %cdef = ( "physall" => ["physread,physwrite,+", "66dd66", "662266", "physical I+O/s"], "logicalall" => ["lgetblock,lgetcons,+", "aa66aa", "aa66aa", "logical B+G/s"], ); # maps: # list of maps we know how to render. after a "--" entry, everything goes # to @graph_params. You can specify a ds or a cdef here. Also any options # from rrdgraph. # "mapname" => [ds:style, cdef:style,... '--', rrdgraph-params...] %maps = ( 'default' => ['physall:LINE1', "logicalall:LINE1", '--', "--vertical-label", "all I/O events"], 'logicalio' => ['lgetblock:LINE1', 'lgetcons:LINE1', '--', "--vertical-label", "logical I/O events"], 'physio' => ['physread:LINE1', 'physwrite:LINE1', '--', "--vertical-label", "physical I/O events"], 'io' => ['physread:LINE1', 'physwrite:LINE1', 'lgetblock:LINE1', 'lgetcons:LINE1', '--', "--vertical-label", "I/O events"], 'event' => ['usercall:LINE1', 'sqlparse:LINE1', 'redo:LINE1', '--', "--vertical-label", "events/second"], 'load' => [ 'cpu:AREA', '--', "--vertical-label", "CPU metrics"], ); # default map, must be defined in %maps above $defmap = 'default'; @overview = ('default'); @detailmaps = ('sqlparse', 'usercall', 'logicalio', 'physio', 'redo', 'load'); # RRA definitions: # RRD retention parameters (used by /opt/peg/bin/rrds) @rra = ( "RRA:AVERAGE:0.5:1:25920", "RRA:AVERAGE:0.5:6:1944", ); # Default rrdgraph params for all map, cdef, and ds presentations above. @init_params = ( # %% "--lower-limit", "0", ); # R.E criteria. $1 is the key, $2 the unique part of the file. $rrdcrit = "^(oracle)-(.*)\.rrd\$"; # success 1;