# $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 CSS/CSM real port (version 1) supports a VIP # # how to present different data sources and build the RRD package PEG::CVU; # All our our's so we're in scope for the above package. # The Template.cvu _must_ `our' all the possible attributes, others could # skip them, I suppose. The sub `renew' at the end of this file must be # in sync with the variables defined here. -- ksb 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 (as a single IMG) 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: real.cvu,v 2.7 2007/02/04 03:36:06 ksb Exp $'; # data sources: # 'dsname' => [line color, area color, descr, build string, update letter] # colors default to '000000' if undef %ds = ( 'state' => [undef, undef, 'state', 'GAUGE:300:1:15', 'S', '@', '@,/'], 'lc' => ['3333cc', undef, 'current', 'GAUGE:300:0:65535', 'L'], 'tlc' => ['33cc33', undef, 'new/s', 'COUNTER:300:0:4294967295', 'T'] ); # 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 = ( 'drop' => ['state,UN,INF,0,IF', 'f0e8e8', undef, 'No Data'], 'offline' => ['state,2,EQ,0,state,4,EQ,0,INF,IF,IF', 'ffccdd', undef, 'Offline'], ); # 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' => ['offline:AREA', 'lc:LINE2', 'tlc:LINE2', 'drop:AREA', '--', '--upper-limit', '10', '--vertical-label', 'Connections'], 'status' => ['offline:AREA', 'state:LINE1', 'drop:AREA', '--', '--upper-limit', '10', 'GPRINT:state:MAX:Max value for state is %.0lf,', 'GPRINT:state:MIN:Min is %.0lf', '--vertical-label', 'operational status'], ); # default map, must be defined in %maps, %cdef or %ds above $defmap = 'default'; @overview = ('default'); @detailmaps = ('lc', 'tlc', 'status'); # RRA definitions: # RRD retention parameters (used by /opt/peg/bin/rrds) @rra = ( 'RRA:AVERAGE:0.5:1:8928', 'RRA:AVERAGE:0.5:12:8040', 'RRA:AVERAGE:0.5:288:731', ); # Default rrdgraph params for all map, cdef, and ds presentations above. @init_params = ( '--lower-limit', '0', ); # Set an image (or frame) render agent (default /cgi-bin/app-rrds.pl) $renderer = undef; # Set a Content-Type (e.g. image/...|text/plain|text/html|... # that the above emits (else default to an IMG). $content = undef; # R.E search criteria. # $1 is the name of this cvu # $2 is the host port traffic is sent to $rrdcrit = '/app-(real)(.*)\.rrd$'; #$rrdcrit = '/app-(vip)(.*)\.rrd$'; # success 1;