# $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 slapd (a Netscape ldap instance) # # $Install(*): ssh %s /usr/local/bin/install -cq - /var/peg/lib/cvu/%f < %f # $Install: ssh sample@peg.sac.fedex.com /usr/local/bin/install -cq - /var/peg/lib/cvu/%f < %f # how to present different data sources and build the RRD package PEG::CVU; # our so we're in scope for the above package our(@rra); # RRA parameters our(@init_params); # Default rrdgraph parameter prefix 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 presented in list context our(@detailmaps); # maps to render for $drilldown/$ask_for_me our($rrdcrit); # R.E. criteria to match an RRD we'll render our($version); # a version string from our conf mgmt sys $version = '$Id: slapd.cvu,v 1.5 2004/10/24 22:07:06 ksb Exp $'; # In the example output below I marked the disposition of each reported # value (S=skip, $N=time-stamp, all else DS name): # Skip dn: cn=monitor # Skip objectClass: top # Skip objectClass: extensibleObject # Skip cn: monitor # Skip version: iPlanet-Directory/5.1 Service Pack 2 B2003.028.2338 # Skip starttime: 20030317172215Z # could be used as N: currenttime: 20030320160121Z # data sources: %ds = ( 'backlog' => ['FF0000', undef, "request-que-backlog", "GAUGE:300:0:65536", 'A'], 'bytessent' => ['009966', undef, "bytessent", "COUNTER:300:0:U", 'B'], 'current' => ['00CC66', undef, "currentconnections", "GAUGE:300:0:U", 'C'], 'dtablesize' => ['3300CC', undef, "dtablesize", "GAUGE:300:0:65536", 'D'], 'entriessent' => ['00CC33', undef, "entriessent", "COUNTER:300:0:U", 'E'], 'nbackends' => ['0000FF', undef, "nbackends", "GAUGE:300:0:65535", 'N'], 'opscompleted' => ['0033CC', undef, "opscompleted", "COUNTER:300:0:U", 'O'], 'opsinitiated' => ['006666', undef, "opsinitiated", "COUNTER:300:0:U", 'I'], 'readwaiters' => ['CC0033', undef, "readwaiters", "GAUGE:300:0:65536", 'W'], 'threads' => ['CC9900', undef, "threads", "GAUGE:300:0:U", 'T'], 'total' => ['6633CC', undef, "totalconnections", "COUNTER:300:0:U", 'L'], ); # 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' => ['current,UN,INF,0,IF', 'f0e8e8', undef, 'No Data'], ); # 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 = ( 'load' => ['current:LINE1', 'total:LINE1', 'backlog:LINE1', 'readwaiters:LINE1', '--', '--vertical-label', 'client throughput'], 'limit' => ['threads:LINE1', 'nbackends:LINE1', '--', '--vertical-label', 'limits'], 'query' => ['opsinitiated:LINE1', 'opscompleted:LINE1', 'entriessent:LINE1', '--', '--vertical-label', 'transaction/second'], 'network' => ['bytessent:LINE1', '--', '--vertical-label', 'bytes/second'], ); # default map, must be defined in %maps above $defmap = 'query'; @overview = ('query', 'load'); @detailmaps = ('query', 'load', 'network', 'limit'); # RRA definitions: # RRD retention parameters (used by /opt/peg/bin/rrds) @rra = ( 'RRA:AVERAGE:0.5:1:12960', 'RRA:AVERAGE:0.5:3:36000', 'RRA:AVERAGE:0.5:288:731' ); # Default rrdgraph params for all map, cdef, and ds presentations above. @init_params = ( "--lower-limit", "0", ); # R.E criteria. $1 is the unique part of the file. $rrdcrit = "/app-(slapd.*)\.rrd\$"; # success 1;