[rrd-users] graph/rrd def for small increment monitoring

Kevin P. Foote kpfoote at iup.edu
Thu Sep 3 22:08:48 CEST 2009


Hi ALL

I know I should be beyond this but ..

I'm trying to monitor a (hopefully) low value attribute within mysql,
slow_query count.

I have setup my rra like the following basing my input on results from this mysql
command (SHOW GLOBAL STATUS like 'Slow_queries') this is an increasing
count of slow queries on this server.


filename = "my_slow_query.rrd"
rrd_version = "0003"
step = 300
last_update = 1252007704
ds[count].type = "COUNTER"
ds[count].minimal_heartbeat = 600
ds[count].min = 0.0000000000e+00
ds[count].max = NaN
ds[count].last_ds = "139"
ds[count].value = 0.0000000000e+00
ds[count].unknown_sec = 0
rra[0].cf = "AVERAGE"
rra[0].rows = 600
rra[0].pdp_per_row = 1
rra[0].xff = 5.0000000000e-01
rra[0].cdp_prep[0].value = NaN
rra[0].cdp_prep[0].unknown_datapoints = 0
rra[1].cf = "AVERAGE"
rra[1].rows = 700
rra[1].pdp_per_row = 6
rra[1].xff = 5.0000000000e-01
rra[1].cdp_prep[0].value = 0.0000000000e+00
rra[1].cdp_prep[0].unknown_datapoints = 0
rra[2].cf = "AVERAGE"
rra[2].rows = 775
rra[2].pdp_per_row = 24
rra[2].xff = 5.0000000000e-01
rra[2].cdp_prep[0].value = 1.4666666667e-01
rra[2].cdp_prep[0].unknown_datapoints = 0
rra[3].cf = "AVERAGE"
rra[3].rows = 797
rra[3].pdp_per_row = 288
rra[3].xff = 5.0000000000e-01
rra[3].cdp_prep[0].value = 1.4666666667e-01
rra[3].cdp_prep[0].unknown_datapoints = 194


I am then trying to graph this with something like this ..

rrdtool graph - \
  --start=end - 1 day \
  --end=now \
  --title=DB slow query \
  --vertical-label=count \
  --imgformat=PNG \
  --width=500 \
  --base=1000 \
  --height=120 \
  --interlaced \
  DEF:a=/opt/mmon//my_slow_query.rrd:count:AVERAGE \
  VDEF:B=a,LAST \
  VDEF:C=a,MAXIMUM \
  AREA:a#FF6347:Slow query\n \
  GPRINT:B:Last\:  %8.2lf%s\r \
  GPRINT:C:Maximal\:  %8.2lf%s\r


The data at start of polling this value was 95 .. it has increased to
139 over the past 4 hours or so .. with most entries into the rra being
the same (but using type COUNTER this should be a LAST of 0) ...

When I get the graph back the resolution on the Y axis is showing 80 m
... this should rather be something like 8 I would think... And the
Maximal value Im GPRINTing is showing 76.75m ..

Have I chosen the incorrect type for my RRA? Is there some other graph 
options that could get this back down to the actual proper scale.

Ive dug through archives a bit .. but cant come up with anything

------
thanks
   kevin.foote



More information about the rrd-users mailing list