Total All Similar*8 on Aggregate graphs (x-files s09e15)

General discussion about Plugins for Cacti

Moderators: Developers, Moderators

Post Reply
User avatar
johnrembo
Cacti User
Posts: 216
Joined: Mon Apr 24, 2006 3:33 am

Total All Similar*8 on Aggregate graphs (x-files s09e15)

Post by johnrembo »

I have a simple task - sum inbound and outbound traffic values and display them as TOTAL_In and TOTAL_Out.

Cdef itself uses nothing but simple SIMILAR_DATA_SOURCES_NODUPS operation.

AFAIK SIMILAR_DATA_SOURCES_NODUPS filters those ds items which are similar (traffic_in for example).

cdef asignment looks fine. for example Total_Out->max = cdefef,
CDEF:cdefef contains of d,h,bb,bf,bj where
d="/opt/cacti/rra/host1_traffic_in_25847.rrd":traffic_out:MAX \
h="/opt/cacti/rra/host1_traffic_in_25848.rrd":traffic_out:MAX \
bb="/opt/cacti/rra/host2_traffic_in_25849.rrd":traffic_out:MAX \
bf="/opt/cacti/rra/host2_traffic_in_25850.rrd":traffic_out:MAX \
bj="/opt/cacti/rra/host2_traffic_in_25851.rrd":traffic_out:MAX \

when separated - those values are displayed on the graph correctly,
but aplyying of SIMILAR_DATA_SOURCES_NODUPS seems to fail.

Code: Select all

/usr/bin/rrdtool graph - \
--imgformat=PNG \
--start=-86400 \
--end=-300 \
--title="Aggregate" \
--rigid \
--base=1000 \
--height=120 \
--width=700 \
--alt-autoscale-max \
--lower-limit=0 \
--vertical-label="bits per second" \
--slope-mode \
--font TITLE:8: \
--font AXIS:8: \
--font LEGEND:8: \
--font UNIT:8: \
DEF:a="/opt/cacti/rra/host1_traffic_in_25847.rrd":traffic_in:AVERAGE \
DEF:b="/opt/cacti/rra/host1_traffic_in_25847.rrd":traffic_in:MAX \
DEF:c="/opt/cacti/rra/host1_traffic_in_25847.rrd":traffic_out:AVERAGE \
DEF:d="/opt/cacti/rra/host1_traffic_in_25847.rrd":traffic_out:MAX \
DEF:e="/opt/cacti/rra/host1_traffic_in_25848.rrd":traffic_in:AVERAGE \
DEF:f="/opt/cacti/rra/host1_traffic_in_25848.rrd":traffic_in:MAX \
DEF:g="/opt/cacti/rra/host1_traffic_in_25848.rrd":traffic_out:AVERAGE \
DEF:h="/opt/cacti/rra/host1_traffic_in_25848.rrd":traffic_out:MAX \
DEF:i="/opt/cacti/rra/host2_traffic_in_25849.rrd":traffic_in:AVERAGE \
DEF:j="/opt/cacti/rra/host2_traffic_in_25849.rrd":traffic_in:MAX \
DEF:ba="/opt/cacti/rra/host2_traffic_in_25849.rrd":traffic_out:AVERAGE \
DEF:bb="/opt/cacti/rra/host2_traffic_in_25849.rrd":traffic_out:MAX \
DEF:bc="/opt/cacti/rra/host2_traffic_in_25850.rrd":traffic_in:AVERAGE \
DEF:bd="/opt/cacti/rra/host2_traffic_in_25850.rrd":traffic_in:MAX \
DEF:be="/opt/cacti/rra/host2_traffic_in_25850.rrd":traffic_out:AVERAGE \
DEF:bf="/opt/cacti/rra/host2_traffic_in_25850.rrd":traffic_out:MAX \
DEF:bg="/opt/cacti/rra/host2_traffic_in_25851.rrd":traffic_in:AVERAGE \
DEF:bh="/opt/cacti/rra/host2_traffic_in_25851.rrd":traffic_in:MAX \
DEF:bi="/opt/cacti/rra/host2_traffic_in_25851.rrd":traffic_out:AVERAGE \
DEF:bj="/opt/cacti/rra/host2_traffic_in_25851.rrd":traffic_out:MAX \
CDEF:cdefa=a,8,* \
CDEF:cdefd=b,8,* \
CDEF:cdefe=c,8,* \
CDEF:cdefh=d,8,* \
CDEF:cdefi=e,8,* \
CDEF:cdefbb=f,8,* \
CDEF:cdefbc=g,8,* \
CDEF:cdefbf=h,8,* \
CDEF:cdefbg=i,8,* \
CDEF:cdefbj=j,8,* \
CDEF:cdefca=ba,8,* \
CDEF:cdefcd=bb,8,* \
CDEF:cdefce=bc,8,* \
CDEF:cdefch=bd,8,* \
CDEF:cdefci=be,8,* \
CDEF:cdefdb=bf,8,* \
CDEF:cdefdc=bg,8,* \
CDEF:cdefdf=bh,8,* \
CDEF:cdefdg=bi,8,* \
CDEF:cdefdj=bj,8,* \
CDEF:cdefea=TIME,1203609608,GT,a,a,UN,0,a,IF,IF,TIME,1203609608,GT,e,e,UN,0,e,IF,IF,TIME,1203609608,GT,i,i,UN,0,i,IF,IF,TIME,1203609608,GT,bc,bc,UN,0,bc,IF,IF,TIME,1203609608,GT,bg,bg,UN,0,bg,IF,IF,+,+,+,+,8,* \
CDEF:cdefec=TIME,1203609608,GT,b,b,UN,0,b,IF,IF,TIME,1203609608,GT,f,f,UN,0,f,IF,IF,TIME,1203609608,GT,j,j,UN,0,j,IF,IF,TIME,1203609608,GT,bd,bd,UN,0,bd,IF,IF,TIME,1203609608,GT,bh,bh,UN,0,bh,IF,IF,+,+,+,+,8,* \
CDEF:cdefed=TIME,1203609608,GT,c,c,UN,0,c,IF,IF,TIME,1203609608,GT,g,g,UN,0,g,IF,IF,TIME,1203609608,GT,ba,ba,UN,0,ba,IF,IF,TIME,1203609608,GT,be,be,UN,0,be,IF,IF,TIME,1203609608,GT,bi,bi,UN,0,bi,IF,IF,+,+,+,+,8,* \
CDEF:cdefef=TIME,1203609608,GT,d,d,UN,0,d,IF,IF,TIME,1203609608,GT,h,h,UN,0,h,IF,IF,TIME,1203609608,GT,bb,bb,UN,0,bb,IF,IF,TIME,1203609608,GT,bf,bf,UN,0,bf,IF,IF,TIME,1203609608,GT,bj,bj,UN,0,bj,IF,IF,+,+,+,+,8,* \
AREA:cdefa#004359FF:"82.135.189.7 Inbound"  \
GPRINT:cdefa:LAST:" Current\:%8.2lf %s"  \
GPRINT:cdefa:AVERAGE:"Average\:%8.2lf %s"  \
GPRINT:cdefd:MAX:"Maximum\:%8.2lf %s\n"  \
AREA:cdefe#EACC00FF:"82.135.189.7 Outbound"  \
GPRINT:cdefe:LAST:"Current\:%8.2lf %s"  \
GPRINT:cdefe:AVERAGE:"Average\:%8.2lf %s"  \
GPRINT:cdefh:MAX:"Maximum\:%8.2lf %s\n"  \
AREA:cdefi#005D57FF:"82.135.189.7 Inbound":STACK \
GPRINT:cdefi:LAST:" Current\:%8.2lf %s"  \
GPRINT:cdefi:AVERAGE:"Average\:%8.2lf %s"  \
GPRINT:cdefbb:MAX:"Maximum\:%8.2lf %s\n"  \
AREA:cdefbc#FFAB00FF:"82.135.189.7 Outbound":STACK \
GPRINT:cdefbc:LAST:"Current\:%8.2lf %s"  \
GPRINT:cdefbc:AVERAGE:"Average\:%8.2lf %s"  \
GPRINT:cdefbf:MAX:"Maximum\:%8.2lf %s\n"  \
AREA:cdefbg#00694AFF:"82.135.189.8 Inbound":STACK \
GPRINT:cdefbg:LAST:" Current\:%8.2lf %s"  \
GPRINT:cdefbg:AVERAGE:"Average\:%8.2lf %s"  \
GPRINT:cdefbj:MAX:"Maximum\:%8.2lf %s\n"  \
AREA:cdefca#EAAF00FF:"82.135.189.8 Outbound":STACK \
GPRINT:cdefca:LAST:"Current\:%8.2lf %s"  \
GPRINT:cdefca:AVERAGE:"Average\:%8.2lf %s"  \
GPRINT:cdefcd:MAX:"Maximum\:%8.2lf %s\n"  \
AREA:cdefce#157419FF:"82.135.189.8 Inbound":STACK \
GPRINT:cdefce:LAST:" Current\:%8.2lf %s"  \
GPRINT:cdefce:AVERAGE:"Average\:%8.2lf %s"  \
GPRINT:cdefch:MAX:"Maximum\:%8.2lf %s\n"  \
AREA:cdefci#EA8F00FF:"82.135.189.8 Outbound":STACK \
GPRINT:cdefci:LAST:"Current\:%8.2lf %s"  \
GPRINT:cdefci:AVERAGE:"Average\:%8.2lf %s"  \
GPRINT:cdefdb:MAX:"Maximum\:%8.2lf %s\n"  \
AREA:cdefdc#008A6DFF:"82.135.189.8 Inbound":STACK \
GPRINT:cdefdc:LAST:" Current\:%8.2lf %s"  \
GPRINT:cdefdc:AVERAGE:"Average\:%8.2lf %s"  \
GPRINT:cdefdf:MAX:"Maximum\:%8.2lf %s\n"  \
AREA:cdefdg#ED7600FF:"82.135.189.8 Outbound":STACK \
GPRINT:cdefdg:LAST:"Current\:%8.2lf %s"  \
GPRINT:cdefdg:AVERAGE:"Average\:%8.2lf %s"  \
GPRINT:cdefdj:MAX:"Maximum\:%8.2lf %s\n"  \
GPRINT:cdefea:LAST:"Total In \:\:\: Current\:%8.2lf %s"  \
GPRINT:cdefea:AVERAGE:"Average\:%8.2lf %s"  \
GPRINT:cdefec:MAX:"Maximum\:%8.2lf %s\n"  \
GPRINT:cdefed:LAST:"Total Out \:\:\: Current\:%8.2lf %s"  \
GPRINT:cdefed:AVERAGE:"Average\:%8.2lf %s"  \
GPRINT:cdefef:MAX:"Maximum\: %8.2lf %s\n" 
1) Is it possible that SIMILAR_DATA_SOURCES_NODUPS can not handle data from different hosts on the same graph correctly?

2) Is it possible that assigment to input or output category depends on what graph item data-source i choose - belonging to host1 or host2?

3) what might be wrong?
Attachments
Correct example. All graph items are from the same host.
Correct example. All graph items are from the same host.
ok.png (57.6 KiB) Viewed 1216 times
Current values are not summed!<br />Total Out Max is being displayed with 15% bias.
Current values are not summed!
Total Out Max is being displayed with 15% bias.
notok.png (114.45 KiB) Viewed 1216 times
Total in max differs from real with 13% error, Total out max differs from real with 16% error.<br />Average shows nonsenses.<br />Current totals - correct.
Total in max differs from real with 13% error, Total out max differs from real with 16% error.
Average shows nonsenses.
Current totals - correct.
notok2.png (49.51 KiB) Viewed 1216 times
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Re: Total All Similar*8 on Aggregate graphs (x-files s09e15)

Post by gandalf »

johnrembo wrote:Cdef itself uses nothing but simple SIMILAR_DATA_SOURCES_NODUPS operation.
I recently fixed some issues with 087b, but missed a last one which is now part of SVN. Which cacti version do you use?
AFAIK SIMILAR_DATA_SOURCES_NODUPS filters those ds items which are similar (traffic_in for example).
Correct
cdef asignment looks fine. for example Total_Out->max = cdefef,
CDEF:cdefef contains of d,h,bb,bf,bj where
d="/opt/cacti/rra/host1_traffic_in_25847.rrd":traffic_out:MAX \
h="/opt/cacti/rra/host1_traffic_in_25848.rrd":traffic_out:MAX \
bb="/opt/cacti/rra/host2_traffic_in_25849.rrd":traffic_out:MAX \
bf="/opt/cacti/rra/host2_traffic_in_25850.rrd":traffic_out:MAX \
bj="/opt/cacti/rra/host2_traffic_in_25851.rrd":traffic_out:MAX \
This indeed is correct. And on the rrdtool graph, this was fine as well, or did I miss sth?
1) Is it possible that SIMILAR_DATA_SOURCES_NODUPS can not handle data from different hosts on the same graph correctly?
At least it should not.
2) Is it possible that assigment to input or output category depends on what graph item data-source i choose - belonging to host1 or host2?
Even if I surely did not try each variation, the host should not be payed attention to, only the ds (e.g. traffic_in OR traffic_out)
3) what might be wrong?
Please point my nose exactly to the correct/broken cdef.
Reinhard
Post Reply

Who is online

Users browsing this forum: No registered users and 4 guests