Agreggating router interfaces into one graph - plus total

Post general support questions here that do not specifically fall into the Linux or Windows categories.

Moderators: Developers, Moderators

User avatar
Linegod
Developer
Posts: 1626
Joined: Thu Feb 20, 2003 10:16 am
Location: Canada
Contact:

Agreggating router interfaces into one graph - plus total

Post by Linegod »

I've had no issue creating a graph containing multiple device data sources (I was going to post to this topic - http://forums.cacti.net/viewtopic.php?t=5698 , but decided not to :) ) - see pics.

What I would like now is to add a legend total for the three sources. Is there currently a way to do this?

Selecting 'Total All Data Souces' as a CDEF, would, I assume, only total the input from the selected data source, not all of them on the graph.
Attachments
combined-in.png
combined-in.png (44.33 KiB) Viewed 64859 times
combined-out.png
combined-out.png (46.42 KiB) Viewed 64859 times
--
Live fast, die young
You're sucking up my bandwidth.

J.P. Pasnak,CD
CCNA, LPIC-1
http://www.warpedsystems.sk.ca
User avatar
Linegod
Developer
Posts: 1626
Joined: Thu Feb 20, 2003 10:16 am
Location: Canada
Contact:

Post by Linegod »

OK, it would appear that creating a new CDEF and using 'Special Data Source: SIMILAR_DATA_SOURCES_NODUPS' and multiplying by 8 (bytes to bits) gives me what I want.
Attachments
Edit graph for total w/bytes to bits
Edit graph for total w/bytes to bits
total-bytes-bits1.png (42.83 KiB) Viewed 64730 times
Customized Total All Data Sources puls bytes to bits
Customized Total All Data Sources puls bytes to bits
total-bytes-bits.png (12.5 KiB) Viewed 64808 times
Last edited by Linegod on Mon Dec 13, 2004 10:14 pm, edited 1 time in total.
--
Live fast, die young
You're sucking up my bandwidth.

J.P. Pasnak,CD
CCNA, LPIC-1
http://www.warpedsystems.sk.ca
mait

Post by mait »

hey,

can you explain to a dummy how exactly did you do that?

Mait
User avatar
Linegod
Developer
Posts: 1626
Joined: Thu Feb 20, 2003 10:16 am
Location: Canada
Contact:

Post by Linegod »

1. Create a new CDEF - Management/Graph Management/CDEFs:
- Click 'Add'
- Create as per the 2nd image above

2. Create a new Graph - Management/Graph Management:
- Click 'Turn Off Graph Debug Mode'
- Click 'Add'
- Leave 'Selected Graph Template' and 'Host' as 'None'
- Click 'create'
- Give your graph a destinctive title and click 'create'
- Add the first data source by clicking 'Add' beside 'Graph Items'
- select your first data source
- select your colour
- in 'Graph Item Type' select 'Area'
- in 'CDEF Function' select 'Bytes into bits'
- give the data source a title
- Click 'create'
- Click 'add' again and create a legend (all values the same as above, except 'Graph Item Type' is 'Legend')
- Add your second data source exactly at the first except 'Graph Item Type' is 'Stack'
- add legend for second data source as above
- Continue adding sources in the same fashion until you are done.

To get the total on the graph, add another Graph Item:
- use the same data source as your last data source
- select your colour
- in 'Graph Item Type' select 'Line 3' (use Line 2 or Line 1 for smaller lines)
- in 'CDEF Function' select 'Total All Data Sources and Bytes into Bits' (the one you created at the start)
- In Text Format, call it 'Total'.
- Click 'create'
- Click 'add' again and create a legend (all values the same as above, except 'Graph Item Type' is 'Legend')

Now you should have a graph with the output from different data sources, plus a total at the bottom.

I created these steps as I made a graph, so it should work :)
--
Live fast, die young
You're sucking up my bandwidth.

J.P. Pasnak,CD
CCNA, LPIC-1
http://www.warpedsystems.sk.ca
moya
Posts: 15
Joined: Fri Feb 06, 2004 6:31 pm

Post by moya »

Just like you said it...it does work.

Thanks a mill :D

-Cesar
d3cypher
Posts: 5
Joined: Tue Mar 08, 2005 10:32 am
Location: N35.22294 W080.83753

Post by d3cypher »

I found this to be very helpful, I've followed it to the letter and it appears the "Total' line is working but the GPRINT info is showing me the last data souce information. Any ideas?

John
Attachments
cacti total not right.JPG
cacti total not right.JPG (69.94 KiB) Viewed 64343 times
User avatar
Linegod
Developer
Posts: 1626
Joined: Thu Feb 20, 2003 10:16 am
Location: Canada
Contact:

Post by Linegod »

Did you do this one:

- in 'CDEF Function' select 'Total All Data Sources and Bytes into Bits' (the one you created at the start)
--
Live fast, die young
You're sucking up my bandwidth.

J.P. Pasnak,CD
CCNA, LPIC-1
http://www.warpedsystems.sk.ca
mrgenius
Posts: 41
Joined: Fri Feb 18, 2005 4:37 pm

Post by mrgenius »

hi!

ok it help me to create the graph i wanted ... :) but i did it through hit n trial.... i wanna know logic behind it.

like the CDEF u created applied bits into bytes function.. whats the need of it?? when u are already selecting CDEF of "bytes into bits" for every indiviual datasource??

wat i understood is that when u create new cdef you are have actually created a variable to hold data from indiviual sources like;

NEW-CDEF = datasource1+datasource2+datasource3+so on

Check my attached graph.. which i created with the way you described. I used same CDEF for outbound traffic too.. and i really didn't understand how it worked??

when i select that created CDEF again for outbound traffic.. did it created new instance(new variable) of that CDEF??

can u plzz explain it mathematically?? bcos while creating graphs for users statistics with same way.. its giving wrong answer... for user stats i created CDEF and select only "ALl Similar datasources no duplicates" and it didn't work.
Attachments
Total Traffic of Six Devices on Single Graph
Total Traffic of Six Devices on Single Graph
mdp-total-traffic.jpg (126.79 KiB) Viewed 64161 times
sohailb
Posts: 17
Joined: Tue Jul 26, 2005 9:32 am

Post by sohailb »

Hey man I just wanted to say that your instructions rock. I have been looking for a step by step for this exact thing all day. I tried a number of different ones and this is the one that worked exactly as you have described. Thanks a ton. :)

-sohailb
Science
Posts: 3
Joined: Tue Sep 20, 2005 1:54 pm

Problem.

Post by Science »

My problem is that my total is totaly f*ck up.. need any help i can get.


Nice tutorial btw. Almost worked :)[/img]
Attachments
cacti_total_fel.png
cacti_total_fel.png (46.63 KiB) Viewed 63281 times
User avatar
Linegod
Developer
Posts: 1626
Joined: Thu Feb 20, 2003 10:16 am
Location: Canada
Contact:

Re: Problem.

Post by Linegod »

Science wrote:My problem is that my total is totaly f*ck up.. need any help i can get.
Looks like you missed adding the legends. Try that, and see if it works.
--
Live fast, die young
You're sucking up my bandwidth.

J.P. Pasnak,CD
CCNA, LPIC-1
http://www.warpedsystems.sk.ca
User avatar
Frodoger
Cacti User
Posts: 94
Joined: Wed Jun 30, 2004 9:28 am
Location: Germany, Frankfurt am Main
Contact:

[mrgenius] i have the same problem

Post by Frodoger »

Hello,

can someone help us (mrgenius and me) ???



greetings
Frodoger
Science
Posts: 3
Joined: Tue Sep 20, 2005 1:54 pm

Now i got it... almost.

Post by Science »

Iv almost got it to work as i want.


1, I Want my legends to be aligned so its looks good.
2, I dont think that the the graphs are totaly correct. I want "Total" to be the sum of Inbound and Outbound (Its the legends that we are talking about.)

Happy for any help.
Attachments
Lookie Lookie :)
Lookie Lookie :)
traffic.png (45.69 KiB) Viewed 63246 times
User avatar
Linegod
Developer
Posts: 1626
Joined: Thu Feb 20, 2003 10:16 am
Location: Canada
Contact:

Re: Now i got it... almost.

Post by Linegod »

Science wrote:Iv almost got it to work as i want.


1, I Want my legends to be aligned so its looks good.
Try selecting 'Auto Padding' and also making sure you have hard returns on the end of each Legend group.
2, I dont think that the the graphs are totaly correct. I want "Total" to be the sum of Inbound and Outbound (Its the legends that we are talking about.)
I've found that order is very important when doing aggregate graphs. Try as per the directions, with Total at the bottom.
--
Live fast, die young
You're sucking up my bandwidth.

J.P. Pasnak,CD
CCNA, LPIC-1
http://www.warpedsystems.sk.ca
User avatar
rony
Developer/Forum Admin
Posts: 6022
Joined: Mon Nov 17, 2003 6:35 pm
Location: Michigan, USA
Contact:

Post by rony »

Also, to get the padding to work right, and if you are using RRDTool 1.2.x, you need to be using a fix width font. Otherwise, there is really no easy way to calculate how far to space it over.

Btw, the default font is fix width.
[size=117][i][b]Tony Roman[/b][/i][/size]
[size=84][i]Experience is what causes a person to make new mistakes instead of old ones.[/i][/size]
[size=84][i]There are only 3 way to complete a project: Good, Fast or Cheap, pick two.[/i][/size]
[size=84][i]With age comes wisdom, what you choose to do with it determines whether or not you are wise.[/i][/size]
Post Reply

Who is online

Users browsing this forum: No registered users and 4 guests