[HOWTO] Sexy Traffic Graphs

If you figure out how to do something interesting/cool in Cacti and want to share it with the community, please post your experience here.

Moderators: Developers, Moderators

thermoman
Posts: 11
Joined: Sun Jul 23, 2006 6:48 am

Post by thermoman »

My Graphs are not so sexy :-)

The legend does get messed up a bit.

Any idea what might cause this?

Graph Debug shows:

CDEF:cdefbc=g,-1,* \
CDEF:cdefbh=a,10,*,e,/ \
CDEF:cdefbi=a,100,*,e,/ \
AREA:a#00CF004C:"Get Hits" \
GPRINT:a:LAST:" Current\:%8.2lf %s" \
GPRINT:a:AVERAGE:"Average\:%8.2lf %s" \
GPRINT:b:MAX:"Maximum\:%8.2lf %s\n" \
AREA:c#FF000066:"Get Misses":STACK \
GPRINT:c:LAST:" Current\:%8.2lf %s" \
GPRINT:c:AVERAGE:"Average\:%8.2lf %s" \
GPRINT:d:MAX:"Maximum\:%8.2lf %s\n" \
LINE1:e#000000FF:"Get Total" \
GPRINT:e:LAST:" Current\:%8.2lf %s" \
GPRINT:e:AVERAGE:"Average\:%8.2lf %s" \
GPRINT:f:MAX:"Maximum\:%8.2lf %s\n" \
LINE1:cdefbc#002A97FF:"Set" \
AREA:cdefbc#002A974C:"" \
GPRINT:g:LAST:" Current\:%8.2lf %s" \
GPRINT:g:AVERAGE:"Average\:%8.2lf %s" \
GPRINT:h:MAX:"Maximum\:%8.2lf %s\n" \
LINE2:cdefbh#0000FFFF:"Hit Ratio (%)" \
GPRINT:cdefbi:LAST:"Current\:%8.2lf %s" \
GPRINT:cdefbi:AVERAGE:"Average\:%8.2lf %s" \
GPRINT:cdefbi:MAX:"Maximum\:%8.2lf %s\n" \
HRULE:0#00000066:""

Graph template and legend see attachments.

Marcel.
Attachments
Wrong indenting in graph legend
Wrong indenting in graph legend
cacti-legend.png (6.23 KiB) Viewed 12650 times
Graph template
Graph template
cacti-graphtemplate.png (3.99 KiB) Viewed 12650 times
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

Please change sequence of items#13 and #14
Reinhard
thermoman
Posts: 11
Joined: Sun Jul 23, 2006 6:48 am

Post by thermoman »

gandalf wrote:Please change sequence of items#13 and #14
Reinhard
Thanks Reinhard, worked like a charm.

Hint for others: It's not importent whether the Area or Line is graphed first but the Text - the Label has to be at second/last position.
spoonwzd
Posts: 28
Joined: Wed Jun 18, 2008 12:10 pm

Post by spoonwzd »

Ok, I've taken all the ideas here and have recreated a standardised version of the 'sexy' graphs. In order to stay professional, I've opted for the title 'Improved' :)

So that importing this graph doesn't mess with your existing config I've taken the time to create a new graph template for each 'Interface' graph AND created a whole new set of data queries.

I have not been able to test the 64-bit counter graphs (as I have no 64-bit counter sources), the errors graph just reports 0's (as I'm not getting any errors on the virtual NIC) or the non-unicast graphs. If anyone can confirm these working then that would be great.

This was created on Cacti 0.8.7c

Image Image
Image Image
Attachments
cacti_data_query_snmp_-_interface_statistics_improved.xml
Improved interface graphing
(125.54 KiB) Downloaded 1391 times
itachi777
Posts: 1
Joined: Sun Aug 03, 2014 9:35 am

Re:

Post by itachi777 »

danno wrote:excellent work!

I have three remaining problems-

-I'm using the 95th percentile traffic, and I noticed that the numbers for the negative graphing are actually negative numbers, unlike yours. I'm looking for 95th percentile on both inbound outbound traffic separately. Maybe I'm asking for too much :)


- I can't get the equivalent 95th percentile line for the negative graphing to work properly... it just uses the 'positive' number and overlaps the actual

- The maximum outbound appears to give an incorrect amount.

Attached is a typical graph from where I'm currently at. I appreciate any insights offered.

Hello, this might be old but i also have this problem. Would you tell me how to fix it? the 95th percentile line stays in positive number.
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests