CDEF no graph

Post support questions that directly relate to Linux/Unix operating systems.

Moderators: Developers, Moderators

Post Reply
cc
Cacti User
Posts: 71
Joined: Fri Sep 27, 2002 3:09 am
Location: CH

CDEF no graph

Post by cc »

Hi

I try to set up the CDEF with 3 interfaces , but no graph:

/usr/bin/rrdtool graph - \
--imgformat=PNG \
--start="-86400" \
--title="Rindermarkt total traffic" \
--rigid \
--base=1000 \
--height=120 \
--width=500 \
--alt-autoscale-max \
--vertical-label="Bytes Per Second" \
DEF:a="/srv/www/htdocs/cacti/rra/traf_192_168_111_3_16777219_in.rrd":traf_192_168_111_3_:AVERAGE \
DEF:b="/srv/www/htdocs/cacti/rra/traf_192_168_111_3_16777219_out.rrd":traf_192_168_111_3_:AVERAGE \
DEF:c="/srv/www/htdocs/cacti/rra/traf_192_168_111_4_16777219_in.rrd":traf_192_168_111_4_:AVERAGE \
DEF:d="/srv/www/htdocs/cacti/rra/traf_192_168_111_4_16777219_out.rrd":traf_192_168_111_4_:AVERAGE \
DEF:e="/srv/www/htdocs/cacti/rra/traf_192_168_111_2_2_in.rrd":traf_192_168_111_2_:AVERAGE \
DEF:f="/srv/www/htdocs/cacti/rra/traf_192_168_111_2_2_out.rrd":traf_192_168_111_2_:AVERAGE \
CDEF:cdefa=e,a,c,+,+,* \
CDEF:cdefb=f,b,d,+,+,* \
LINE1:cdefa#009F67:"total traffic in" \
LINE2:cdefb#0000FF:"total traffic out" \
AREA:e#:"" \
AREA:c#:"" \
AREA:a#:"" \
AREA:d#:"" \
AREA:b#:"" \
AREA:f#:""

Know somebody why ?

Regards
chris
User avatar
bulek
Cacti Pro User
Posts: 854
Joined: Mon May 20, 2002 2:07 am
Location: Poland
Contact:

Post by bulek »

Your CDEF function seems to be incorrect. You probably forgot of multiplying by 8. Right now you just add values from three interfaces and multiply it by nothing.

- bulek
cc
Cacti User
Posts: 71
Joined: Fri Sep 27, 2002 3:09 am
Location: CH

still no graph

Post by cc »

thanks, but still no graph:

/usr/bin/rrdtool graph - \
--imgformat=PNG \
--start="-86400" \
--title="Rindermarkt total traffic" \
--rigid \
--base=1000 \
--height=120 \
--width=500 \
--alt-autoscale-max \
--vertical-label="Bytes Per Second" \
DEF:a="/srv/www/htdocs/cacti/rra/traf_192_168_111_3_16777219_in.rrd":traf_192_168_111_3_:AVERAGE \
DEF:b="/srv/www/htdocs/cacti/rra/traf_192_168_111_4_16777219_in.rrd":traf_192_168_111_4_:AVERAGE \
DEF:c="/srv/www/htdocs/cacti/rra/traf_192_168_111_2_2_in.rrd":traf_192_168_111_2_:AVERAGE \
CDEF:cdefa=c,a,b,+,+,*,8 \
LINE1:cdefa#009F67:"total traffic in" \
LINE1:c#:"Average\:" \
LINE1:b#:"Average\:" \
LINE1:a#:"Average\:"


Regards
cc
cc
Cacti User
Posts: 71
Joined: Fri Sep 27, 2002 3:09 am
Location: CH

Mam pytanie do Pana bulka

Post by cc »

Hi

Chyba Pan jest jedynym w tom forum, ktory jest w stanie mi pomoc
i do tej pory rowniez Pan mi duzo pomogl.
Czy istnieje w ogole taka mozliwosc z 3 interface : 2 x Workstation
und 1 Printer zrobic sume i pkazac jako sume na jednym diagramie
i tylko jedna linia ?

Pozdrawiam
Christoph
User avatar
bulek
Cacti Pro User
Posts: 854
Joined: Mon May 20, 2002 2:07 am
Location: Poland
Contact:

Post by bulek »

It's nice to see this language here :) however as long as we are talking on public forum I propose to use english so that the others can benefit as well.

I'm not sure how to add 3 series on one graph. This can be done using CDEF but I've never tried it before. You can however add three data series using STACK graphs. First select "Turn bytes into bits" CDEF function. Then mark your first data serie as AREA and two others as STACK. This will give you also a sum of the three data series on the graph.

- bulek
cc
Cacti User
Posts: 71
Joined: Fri Sep 27, 2002 3:09 am
Location: CH

Hi

Post by cc »

Where can I select "Turn bytes into bits" ?
I can't find it.

Best Regards
Christoph
User avatar
bulek
Cacti Pro User
Posts: 854
Joined: Mon May 20, 2002 2:07 am
Location: Poland
Contact:

Post by bulek »

It is on "Graph Items Configuration" page. Look for drop-down list called "CDEF Function".

- bulek
cc
Cacti User
Posts: 71
Joined: Fri Sep 27, 2002 3:09 am
Location: CH

Hi

Post by cc »

Hi

I don't konow, how exactly You mean:
something, like this ?

Graph Items for: Rindermarkt total traffic Add
Turn Graph Preview On
Turn Graph Output Preview On
Turn Graph Grouping On
Graph Item Data Source Name Graph Item Type Item Color Sequence Add
Item #1 CDEF: Turn Bytes into Bits AREA 00A348 [Down], [Up] Remove
Item #2 traf_192_168_111_2_2_in: Maximum:<HR> GPRINT [Down], [Up] Remove
Item #3 traf_192_168_111_3_16777219_in: Average: GPRINT [Down], [Up] Remove
Item #4 traf_192_168_111_3_16777219_in: Current: GPRINT [Down], [Up] Remove
Item #5 traf_192_168_111_4_16777219_in: Average: GPRINT [Down], [Up] Remove
Item #6 traf_192_168_111_4_16777219_in: Current: GPRINT [Down], [Up] Remove
Item #7 traf_192_168_111_4_16777219_in: Maximum:<HR> GPRINT [Down], [Up] Remove
Item #8 traf_192_168_111_2_2_in: Average: GPRINT [Down], [Up] Remove
Item #9 traf_192_168_111_3_16777219_in: Maximum:<HR> GPRINT [Down], [Up] Remove
Item #10 traf_192_168_111_2_2_in: Current: GPRINT [Down], [Up] Remove
Item #11 CDEF: Turn Bytes into Bits STACK 0000FF [Down], [Up] Remove
Item #12 traf_192_168_111_2_2_out: Current: GPRINT [Down], [Up] Remove
Item #13 traf_192_168_111_3_16777219_out: Current: GPRINT [Down], [Up] Remove
Item #14 traf_192_168_111_4_16777219_out: Current: GPRINT [Down], [Up] Remove
Item #15 traf_192_168_111_2_2_out: Average: GPRINT [Down], [Up] Remove
Item #16 traf_192_168_111_3_16777219_out: Average: GPRINT [Down], [Up] Remove
Item #17 traf_192_168_111_4_16777219_out: Average: GPRINT [Down], [Up] Remove
Item #18 traf_192_168_111_2_2_out: Maximum:<HR> GPRINT [Down], [Up] Remove
Item #19 traf_192_168_111_3_16777219_out: Maximum:<HR> GPRINT [Down], [Up] Remove
Item #20 traf_192_168_111_4_16777219_out: Maximum:<HR> GPRINT [Down], [Up] Remove

Regards
Chris
User avatar
bulek
Cacti Pro User
Posts: 854
Joined: Mon May 20, 2002 2:07 am
Location: Poland
Contact:

Post by bulek »

Well... this looks like mess ;). I think hypotetical example should look like this:
Graph Item Data Source Name Graph Item Type Item Color Sequence Add
Item #1 traf_192_168_111_2_2_in AREA 00FF00 [Down], [Up] Remove
Item #2 traf_192_168_111_2_2_in: Current: GPRINT [Down], [Up] Remove
Item #3 traf_192_168_111_2_2_in: Average: GPRINT [Down], [Up] Remove
Item #4 traf_192_168_111_2_2_in: Maximum:<HR> GPRINT [Down], [Up] Remove
Item #5 traf_192_168_111_3_16777219_in STACK 00A348 [Down], [Up] Remove
Item #6 traf_192_168_111_3_16777219_in: Current: GPRINT [Down], [Up] Remove
Item #7 traf_192_168_111_3_16777219_in: Average: GPRINT [Down], [Up] Remove
Item #8 traf_192_168_111_3_16777219_in: Maximum:<HR> GPRINT [Down], [Up] Remove
Item #9 traf_192_168_111_4_16777219_in STACK 2175D9 [Down], [Up] Remove
Item #10 traf_192_168_111_4_16777219_in: Current: GPRINT [Down], [Up] Remove
Item #11 traf_192_168_111_4_16777219_in: Average: GPRINT [Down], [Up] Remove
Item #12 traf_192_168_111_4_16777219_in: Maximum:<HR> GPRINT [Down], [Up] Remove



Sorry... text file is not the best way for explaining how to set up the graph.

- bulek
cc
Cacti User
Posts: 71
Joined: Fri Sep 27, 2002 3:09 am
Location: CH

Hi

Post by cc »

But what do you mean, I think,
is to show 3 interfaces each one separately on the graph.
I want to have the sum of these interfaces with only one line.

Regards
Christoph
User avatar
bulek
Cacti Pro User
Posts: 854
Joined: Mon May 20, 2002 2:07 am
Location: Poland
Contact:

Post by bulek »

Yes... but each interface is on top of the previous one. As a result you see total traffic for all of them ( you can imagine a line on top of the last interface). However if you insist just on one line then I can't help you. This can be done with CDEF but I didn't try it before.

- bulek
cc
Cacti User
Posts: 71
Joined: Fri Sep 27, 2002 3:09 am
Location: CH

Hi

Post by cc »

I need only one line and I know that can be done with CDEF funktion.
I know that's complicated.
If that doesn't work I do it with mrtg, it's much easier.
Anyway thanks for your help.
Where do you live in Poland ?
For me you are one of the best cacti gurus.

Greetings
Christoph
User avatar
bulek
Cacti Pro User
Posts: 854
Joined: Mon May 20, 2002 2:07 am
Location: Poland
Contact:

Post by bulek »

Thanks for nice words. For sure I don't feel myself as a guru. I just spent some time on this excellent software and try to offload Ian a bit by answering here to give him time required for 0.8 version progress.

- bulek
Hi

Post by Hi »

Hi bulek

Who is Ian ?
Is he polish also ?

Best Regards
Christoph
User avatar
bulek
Cacti Pro User
Posts: 854
Joined: Mon May 20, 2002 2:07 am
Location: Poland
Contact:

Post by bulek »

I assume you are "cc" user looking like "Hi" right now. Man... you really should read some docs before shooting all kind of questions on this board :-?.

Ian is cacti author and he for sure does not live in Poland.

- bulek
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest