[HOWTO] How can I make SUM of graphs
Moderators: Developers, Moderators
[HOWTO] How can I make SUM of graphs
Hello All,
I'm newbie on CACTI.
Is it possible to make SUM on CACTI?
If yes, how can I do it?
Regards,
I'm newbie on CACTI.
Is it possible to make SUM on CACTI?
If yes, how can I do it?
Regards,
José Esteves
-------------------------------------------------------
"DVBITANDO, AD VERITATEM PARVENIMVS... ALIQVANDO!"
-------------------------------------------------------
"DVBITANDO, AD VERITATEM PARVENIMVS... ALIQVANDO!"
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
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
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?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 .
Thanks for the help
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:
-Ian
If you want bandwidth summation on your graphs, you will have to modify your traffic template manually. Here is a good working variable:
Code: Select all
|sum:auto:current:2:auto|
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?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
-Ian
Hi,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
I read Graph variables section of cacti. I use |
Code: Select all
sum:(auto):(current):(2):(auto)|
Code: Select all
|sum:(auto):(current):(2):(auto)|
Hi,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
I read Graph variables section of cacti. I use |
Code: Select all
sum:(auto):(current):(2):(auto)|
Code: Select all
|sum:(auto):(current):(2):(auto)|
You don't want to include the parenthesis in the variable. Instead, you should use:
-Ian
Code: Select all
|sum:auto:current:2:auto|
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
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
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
-Ian
Hello,raX wrote: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?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
-Ian
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
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.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 ?
-Ian
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
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
Who is online
Users browsing this forum: No registered users and 2 guests