Cacti (home)ForumsRepositoryDocumentation
Cacti: offical forums and support  

 FAQFAQ   SearchSearch   MemberlistMemberlist    RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in    


[HOWTO] How can I make SUM of graphs
Goto page 1, 2, 3, 4  Next
 
Post new topic   Reply to topic    Cacti Forum Index -> Informational/HOWTO's
Author Message
Big_Tummy



Joined: 01 Sep 2003
Posts: 1

PostPosted: Mon Sep 01, 2003 9:16 am    Post subject: [HOWTO] How can I make SUM of graphs Reply with quote

Hello All,

I'm newbie on CACTI.

Is it possible to make SUM on CACTI?

If yes, how can I do it?

Regards,
Back to top
raX
Lead Developer


Joined: 13 Oct 2001
Posts: 2234
Location: Carlisle, PA

PostPosted: Mon Sep 01, 2003 11:49 am    Post subject: Reply with quote

Yes, this is possible with the latest version of Cacti. It is described in a bit more detail in the following page of the manual under "Bandwidth Summation".

If you are a new user of Cacti, the easiest way to create graphs with a sum already on them is to:

1) Go to "Polling Hosts" in Cacti.
2) Either add a new host or edit a host that contains traffic you want to sum up.
3) Make sure you have the "SNMP - Interface Statistics" data query selected by selecting "SNMP - Interface Statistics" under "Associated Data Query" and clicking "Add".
4) Place a checkbox next to the interfaces you want to create summation graphs for.
5) Click on the dropdown that says "In/Out Bits" and select "In/Out Bytes with Total Bandwidth".
6) Once you click save, you should have some graphs that contain summation data on them .

The following set of instructions assumes that you want to sum up traffic, which is most often the case. You are not limited to this however. The instructions provided in the manual should work for any type of data.

-ian
Back to top
Guest






PostPosted: Wed Sep 03, 2003 10:16 am    Post subject: Reply with quote

Quote:
rax wrote

1) Go to "Polling Hosts" in Cacti.
2) Either add a new host or edit a host that contains traffic you want to sum up.
3) Make sure you have the "SNMP - Interface Statistics" data query selected by selecting "SNMP - Interface Statistics" under "Associated Data Query" and clicking "Add".
4) Place a checkbox next to the interfaces you want to create summation graphs for.
5) Click on the dropdown that says "In/Out Bits" and select "In/Out Bytes with Total Bandwidth".
6) Once you click save, you should have some graphs that contain summation data on them .


I have just upgraded to 0.8.3a and I have tried to create a total bandwidth graph using the instructions above but when I click on the dropdown to shoose In/Out Bytes with Total Bandwidth this option is unavailable. Did my upgrade not complete properly? Is there some way i can confirm the validity of my install?

Thanks for the help
Back to top
raX
Lead Developer


Joined: 13 Oct 2001
Posts: 2234
Location: Carlisle, PA

PostPosted: Wed Sep 03, 2003 11:28 pm    Post subject: Reply with quote

More than likely your installation is just fine. You will only see this option for new installations of version 0.8.3a, not for upgrades from previous versions. This is intentional as I try to refrain from messing with a user's database too much during an upgrade. One of the features coming up in the next version will allow you to export/import this kind of thing to/from an XML file to share with others.

If you want bandwidth summation on your graphs, you will have to modify your traffic template manually. Here is a good working variable:

Code:
|sum:auto:current:2:auto|


-Ian
Back to top
Fred
Cacti User


Joined: 03 Jan 2003
Posts: 78

PostPosted: Thu Sep 04, 2003 7:43 am    Post subject: Reply with quote

raX wrote:
One of the features coming up in the next version will allow you to export/import this kind of thing to/from an XML file to share with others.


Woohoo!

I think this will really make cacti take off as people build templates for various host types.
Back to top
atrocity



Joined: 26 Aug 2003
Posts: 18

PostPosted: Mon Sep 08, 2003 4:39 pm    Post subject: Reply with quote

Hello,

I followed Rax's HowTo for the summation, but it's not working for me ....
I deleted everything (my rra files also ;( ) and re-install Cacti from scratch. Then i followed the HowTo, without success...
Can some one help me ?
Thanks
Best regards
Jean
Back to top
raX
Lead Developer


Joined: 13 Oct 2001
Posts: 2234
Location: Carlisle, PA

PostPosted: Mon Sep 08, 2003 11:40 pm    Post subject: Reply with quote

atrocity wrote:
Hello,

I followed Rax's HowTo for the summation, but it's not working for me ....
I deleted everything (my rra files also ;( ) and re-install Cacti from scratch. Then i followed the HowTo, without success...
Can some one help me ?
Thanks
Best regards
Jean


Are you getting broken graphs when trying to use bandwidth summation? If you click "view source" below any of these graphs, are any errors displayed? What variable are you using on your graphs to display bandwidth summation?

-Ian
Back to top
TFC
Cacti Pro User


Joined: 09 Apr 2003
Posts: 610
Location: Izmir/Turkey

PostPosted: Tue Sep 09, 2003 1:47 am    Post subject: Reply with quote

raX wrote:
Yes, this is possible with the latest version of Cacti. It is described in a bit more detail in the following page of the manual under "Bandwidth Summation".

If you are a new user of Cacti, the easiest way to create graphs with a sum already on them is to:

1) Go to "Polling Hosts" in Cacti.
2) Either add a new host or edit a host that contains traffic you want to sum up.
3) Make sure you have the "SNMP - Interface Statistics" data query selected by selecting "SNMP - Interface Statistics" under "Associated Data Query" and clicking "Add".
4) Place a checkbox next to the interfaces you want to create summation graphs for.
5) Click on the dropdown that says "In/Out Bits" and select "In/Out Bytes with Total Bandwidth".
6) Once you click save, you should have some graphs that contain summation data on them .

The following set of instructions assumes that you want to sum up traffic, which is most often the case. You are not limited to this however. The instructions provided in the manual should work for any type of data.

-ian

Hi,
I read Graph variables section of cacti. I use |
Code:
sum:(auto):(current):(2):(auto)|

I copy this both line to Graph Templates/Interface Traffics(bits/sec)/Graph Item/Item#2 (it is gprint ,shows Current:)/Values and Text format. Then I turn to graph page. I see that No values. Just text as
Code:
|sum:(auto):(current):(2):(auto)|

What is my mistake?
Back to top
TFC
Cacti Pro User


Joined: 09 Apr 2003
Posts: 610
Location: Izmir/Turkey

PostPosted: Tue Sep 09, 2003 2:03 am    Post subject: Reply with quote

raX wrote:
Yes, this is possible with the latest version of Cacti. It is described in a bit more detail in the following page of the manual under "Bandwidth Summation".

If you are a new user of Cacti, the easiest way to create graphs with a sum already on them is to:

1) Go to "Polling Hosts" in Cacti.
2) Either add a new host or edit a host that contains traffic you want to sum up.
3) Make sure you have the "SNMP - Interface Statistics" data query selected by selecting "SNMP - Interface Statistics" under "Associated Data Query" and clicking "Add".
4) Place a checkbox next to the interfaces you want to create summation graphs for.
5) Click on the dropdown that says "In/Out Bits" and select "In/Out Bytes with Total Bandwidth".
6) Once you click save, you should have some graphs that contain summation data on them .

The following set of instructions assumes that you want to sum up traffic, which is most often the case. You are not limited to this however. The instructions provided in the manual should work for any type of data.

-ian

Hi,
I read Graph variables section of cacti. I use |
Code:
sum:(auto):(current):(2):(auto)|

I copy this both line to Graph Templates/Interface Traffics(bits/sec)/Graph Item/Item#2 (it is gprint ,shows Current:)/Values and Text format. Then I turn to graph page. I see that No values. Just text as
Code:
|sum:(auto):(current):(2):(auto)|

What is my mistake?
Back to top
raX
Lead Developer


Joined: 13 Oct 2001
Posts: 2234
Location: Carlisle, PA

PostPosted: Wed Sep 10, 2003 6:36 pm    Post subject: Reply with quote

You don't want to include the parenthesis in the variable. Instead, you should use:

Code:
|sum:auto:current:2:auto|


-Ian
Back to top
smartinez



Joined: 13 Mar 2003
Posts: 21
Location: Austin, Texas

PostPosted: Thu Sep 11, 2003 3:05 pm    Post subject: Reply with quote

While on the topic of summation...

We have a Cisco 6513 that hosts multiple groupings of servers. For example, ports 1 - 5 terminate 5 servers that belong to one group (group1), ports 6 - 10 terminate 5 servers that belong to another group (group2), etc.

I want to take the total throughput of group1 and the total throughput of group2 and graph them together on one graph.

As a test, I used the "Total All Data Sources" found in the "Graph Items" section to create a total of ports 1 - 5 and it worked great. I got a graph that shows all 5 interfaces plus a 6th line that is the total of all 5.

So, I want to take that 6th line and the 6th line of the second graph and combine only those 2 on one graph.

Am I trying accomplish something out of the scope of Cacti?

I tried to use the "Bandwidth Summation" process listed below but what I got was individual interface graphs with the sum of all graphs listed at the bottom of each graph.

Thanks for all your assistance!

-Samson
Back to top
raX
Lead Developer


Joined: 13 Oct 2001
Posts: 2234
Location: Carlisle, PA

PostPosted: Sun Sep 14, 2003 4:59 pm    Post subject: Reply with quote

Trying to combine the "Total All Data Sources" which is CDEF based and the bandwidth summation which is variable based will not work. The main difference is that RRDTool handles the CDEFs, while Cacti handles any graph variables such as 95th percentile and bandwidth summation. The only way to do this would be to add a graph variable called "total all data sources", which would be much slower than the RRDTool way.

-Ian
Back to top
atrocity



Joined: 26 Aug 2003
Posts: 18

PostPosted: Sun Sep 14, 2003 5:53 pm    Post subject: Reply with quote

raX wrote:
atrocity wrote:
Hello,

I followed Rax's HowTo for the summation, but it's not working for me ....
I deleted everything (my rra files also ;( ) and re-install Cacti from scratch. Then i followed the HowTo, without success...
Can some one help me ?
Thanks
Best regards
Jean


Are you getting broken graphs when trying to use bandwidth summation? If you click "view source" below any of these graphs, are any errors displayed? What variable are you using on your graphs to display bandwidth summation?

-Ian


Hello,

I deleted every Polling Host, the recreated it like the how to of this thread.
Now, after about 15 minutes, i can see the Daily graph. Think i have to wait, that cacti generate the 3 others, no ?

Here is the 'view source' :
/usr/local/rrdtool-1.0.45/bin/rrdtool graph - \
--imgformat=PNG \
--start=-86400 \
--title="Switch Cisco XL2924 - Traffic - Fa0/1" \
--rigid \
--base=1000 \
--height=120 \
--width=500 \
--alt-autoscale-max \
--lower-limit=0 \
--vertical-label="bits per second" \
DEF:a="/home/virtual/site10/fst/var/www/html/rra/switch_cisco_xl2924_ds0_172.rrd":ds0:AVERAGE \
DEF:b="/home/virtual/site10/fst/var/www/html/rra/switch_cisco_xl2924_ds0_172.rrd":ds1:AVERAGE \
CDEF:cdefa=a,8,* \
CDEF:cdeff=b,8,* \
AREA:cdefa#00CF00:"Inbound" \
GPRINT:cdefa:LAST:" Current\:%8.2lf %s" \
GPRINT:cdefa:AVERAGE:"Average\:%8.2lf %s" \
GPRINT:cdefa:MAX:"Maximum\:%8.2lf %s" \
COMMENT:"Total In: 1.11 GB\n" \
LINE1:cdeff#002A97:"Outbound" \
GPRINT:cdeff:LAST:"Current\:%8.2lf %s" \
GPRINT:cdeff:AVERAGE:"Average\:%8.2lf %s" \
GPRINT:cdeff:MAX:"Maximum\:%8.2lf %s" \
COMMENT:"Total Out: 1.2 GB"

I can't see anything about summation ... ;(
Don't you receive my PM ? I mailed you the url and the admin password...
Thanks
Jean
Back to top
raX
Lead Developer


Joined: 13 Oct 2001
Posts: 2234
Location: Carlisle, PA

PostPosted: Sun Sep 14, 2003 6:02 pm    Post subject: Reply with quote

atrocity wrote:
I deleted every Polling Host, the recreated it like the how to of this thread.
Now, after about 15 minutes, i can see the Daily graph. Think i have to wait, that cacti generate the 3 others, no ?


I have actually experienced this problem once myself, unfortunately after I released 0.8.3a . The problem will fix itself (all four graphs will work) after 24 hours. Sorry about the inconvenience, it will be fixed in the next version.

-Ian
Back to top
atrocity



Joined: 26 Aug 2003
Posts: 18

PostPosted: Sun Sep 14, 2003 6:03 pm    Post subject: Reply with quote

ehm, excuse my stupid question, but this summation, is it IN the graphs ?
If yes, then it's ok ... it's working.
But what i really want, is the possibility to put tables, with the summary of the trafic in numbers...
I have a nice PHP script, that can summarize the trafic. You can choose to see the results for a period of days, or for a whole mounth, also a year if you collected the data... Really, i will appreciate if something like that can be done in Cacti, because actually i continue to use MRTG, only for that feature ....
I will be more then happy to share this script, if someone think that it can be used / converted to and for Cacti
Jean
Back to top
Display posts from previous:   
Post new topic   Reply to topic    Cacti Forum Index -> Informational/HOWTO's All times are GMT - 5 Hours
Goto page 1, 2, 3, 4  Next
Page 1 of 4

 



Powered by phpBB © 2001, 2005 phpBB Group