Hi,
I've got an odd problem which has cropped up recently - I think since moving from 0.8.7d to 0.8.7e.
I've attached an example of the problem. The graph is set to draw a line1 line with the MAX cdef value. This draws correctly, displaying the max peak ~ 3/4 of the way along the graph on a Monday of a touch under 180mbit. However, the legend MAX cdef shows a value of 164.13Mbit for period.
The .rrd that this is working from is a lossless year-long file with a five minute poll time and MIN, AVERAGE and MAX CDEFs.
This problem doesn't appear to happen in recent graphs (the past day or two) - peaks on the graph will match the max values reported in the legend, however it's very obvious over a monthly period that the MAX from the graph isn't matching the MAX that the legend is reporting.
This was working fine a while ago, I first noticed the issue after moving to 0.8.7e so it's possible there was a change between versions that caused this..
Anyone have any ideas?
Max CDEF giving different values
Moderators: Developers, Moderators
Max CDEF giving different values
- Attachments
-
- traffic.png (58.21 KiB) Viewed 1405 times
Hi Gandalf,
Graph debug info (with graph showing last 24 hours as per default in graph management):
RRDTool Command:
/usr/bin/rrdtool graph - \
--imgformat=PNG \
--start=-86400 \
--end=-300 \
--title="XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" \
--rigid \
--base=1000 \
--height=200 \
--width=700 \
--alt-autoscale-max \
--lower-limit=0 \
--vertical-label="bits per second" \
--slope-mode \
--font TITLE:10:/usr/share/fonts/truetype/ttf-dejavu/DejaVuSansMono.ttf \
--font AXIS:8:/usr/share/fonts/truetype/ttf-dejavu/DejaVuSansMono.ttf \
--font LEGEND:8:/usr/share/fonts/truetype/ttf-dejavu/DejaVuSansMono.ttf \
--font UNIT:8:/usr/share/fonts/truetype/ttf-dejavu/DejaVuSansMono.ttf \
DEF:a="/var/lib/cacti/rra/XXXXXXX.rrd":traffic_in:MAX \
DEF:b="/var/lib/cacti/rra/XXXXXXX.rrd":traffic_in:AVERAGE \
DEF:c="/var/lib/cacti/rra/XXXXXXX.rrd":traffic_out:MAX \
DEF:d="/var/lib/cacti/rra/XXXXXXX.rrd":traffic_out:AVERAGE \
CDEF:cdefa=a,8,* \
CDEF:cdefb=b,8,* \
CDEF:cdefg=c,8,* \
CDEF:cdefh=d,8,* \
LINE1:cdefa#00CF00FF:"Inbound" \
AREA:cdefb#00CF0019:"" \
GPRINT:cdefb:LAST:" Current\:%8.2lf %s" \
GPRINT:cdefb:MIN:"Minimum\:%8.2lf %s" \
GPRINT:cdefb:AVERAGE:"Average\:%8.2lf %s" \
GPRINT:cdefb:MAX:"Maximum\:%8.2lf %s\n" \
LINE1:cdefg#002A97FF:"Outbound" \
AREA:cdefh#002A9719:"" \
GPRINT:cdefh:LAST:" Current\:%8.2lf %s" \
GPRINT:cdefh:MIN:"Minimum\:%8.2lf %s" \
GPRINT:cdefh:AVERAGE:"Average\:%8.2lf %s" \
GPRINT:cdefh:MAX:"Maximum\:%8.2lf %s\n" \
HRULE:6777.93#00CF00FF:"95th Percentile Inbound" \
COMMENT:"0.01mbit\n" \
HRULE:170174520.71#002A97FF:"95th Percentile Outbound" \
COMMENT:"170.17mbit\n"
RRDTool Says:
OK
Graph debug info (with graph showing last 24 hours as per default in graph management):
RRDTool Command:
/usr/bin/rrdtool graph - \
--imgformat=PNG \
--start=-86400 \
--end=-300 \
--title="XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" \
--rigid \
--base=1000 \
--height=200 \
--width=700 \
--alt-autoscale-max \
--lower-limit=0 \
--vertical-label="bits per second" \
--slope-mode \
--font TITLE:10:/usr/share/fonts/truetype/ttf-dejavu/DejaVuSansMono.ttf \
--font AXIS:8:/usr/share/fonts/truetype/ttf-dejavu/DejaVuSansMono.ttf \
--font LEGEND:8:/usr/share/fonts/truetype/ttf-dejavu/DejaVuSansMono.ttf \
--font UNIT:8:/usr/share/fonts/truetype/ttf-dejavu/DejaVuSansMono.ttf \
DEF:a="/var/lib/cacti/rra/XXXXXXX.rrd":traffic_in:MAX \
DEF:b="/var/lib/cacti/rra/XXXXXXX.rrd":traffic_in:AVERAGE \
DEF:c="/var/lib/cacti/rra/XXXXXXX.rrd":traffic_out:MAX \
DEF:d="/var/lib/cacti/rra/XXXXXXX.rrd":traffic_out:AVERAGE \
CDEF:cdefa=a,8,* \
CDEF:cdefb=b,8,* \
CDEF:cdefg=c,8,* \
CDEF:cdefh=d,8,* \
LINE1:cdefa#00CF00FF:"Inbound" \
AREA:cdefb#00CF0019:"" \
GPRINT:cdefb:LAST:" Current\:%8.2lf %s" \
GPRINT:cdefb:MIN:"Minimum\:%8.2lf %s" \
GPRINT:cdefb:AVERAGE:"Average\:%8.2lf %s" \
GPRINT:cdefb:MAX:"Maximum\:%8.2lf %s\n" \
LINE1:cdefg#002A97FF:"Outbound" \
AREA:cdefh#002A9719:"" \
GPRINT:cdefh:LAST:" Current\:%8.2lf %s" \
GPRINT:cdefh:MIN:"Minimum\:%8.2lf %s" \
GPRINT:cdefh:AVERAGE:"Average\:%8.2lf %s" \
GPRINT:cdefh:MAX:"Maximum\:%8.2lf %s\n" \
HRULE:6777.93#00CF00FF:"95th Percentile Inbound" \
COMMENT:"0.01mbit\n" \
HRULE:170174520.71#002A97FF:"95th Percentile Outbound" \
COMMENT:"170.17mbit\n"
RRDTool Says:
OK
- gandalf
- Developer
- Posts: 22383
- Joined: Thu Dec 02, 2004 2:46 am
- Location: Muenster, Germany
- Contact:
The MAX in the GPRINT refers to a MAX of AVERAGEs (represented by the AREA graph item). You were referring to the MAX of MAXs (represented by the LINE graph item).
You may want to add GPRINTs for the MAX CF as well to clearly see the difference. To do so,select e.g. outbound ds, CF = MAX and type = LEGEND
R.
You may want to add GPRINTs for the MAX CF as well to clearly see the difference. To do so,select e.g. outbound ds, CF = MAX and type = LEGEND
R.
Blah, that was silly of me. I had a Line and an Area defined separately for both inbound and outbound, and I'd put the legend under the Averaged Area instead of the Maxed Line - I didn't realise that GPRINT/LEGEND types inherited the CF type from the 'parent' line or area.
Thanks for the headcheck gandalf
Thanks for the headcheck gandalf
Re: Max CDEF giving different values
Wow, this old thread is still very relevant today (with version 1.2.25). Per Moriarty's insight, I adjusted my interface traffic graph template so that the Maximum GPRINT is separately situated below the LINE with Max CF Type and sure enough the output is now what I expected. Thanks a lot for describing that arguably non-intuitive behavior in detail.
To reiterate the essential point here: it's not enough that a given GPRINT's CF Type is explicitly set; it must also be positioned (as in sequence) below the line/area representing the appropriate CF Type.
To reiterate the essential point here: it's not enough that a given GPRINT's CF Type is explicitly set; it must also be positioned (as in sequence) below the line/area representing the appropriate CF Type.
Who is online
Users browsing this forum: No registered users and 2 guests