[Solved] Need Help with Summation

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

Moderators: Developers, Moderators

Post Reply
Fëanor
Posts: 10
Joined: Tue Sep 13, 2011 1:41 am

[Solved] Need Help with Summation

Post by Fëanor »

http://docs.cacti.net/manual:087:6_reference.variables
(current|total) You can choose to calculate the summation based on the current data source or a total of all data sources used on the graph. The only valid values for this field are 'current' and 'total'.

Here is the graph variable I have inserted into my comment: |sum:6:total:2:auto|

The issue I've encountered is that this graph variable is giving me double the correct sum. At first I could not figure out why. Then, like all IT lunatics, the problem haunted me in my sleep until I figured it out. The reason my results were double the correct value, is because the total argument for the summation function actually has nothing to do with "data sources". In fact, it is totalling the graph items.

You see, on this graph, I have each data source graphed as two graph items: a LINE3 at the top with a shaded AREA underneath. I got this idea from the posting here: http://jackofallit.wordpress.com/2008/0 ... ti-graphs/

Now, my question is: how can I properly calculate the sum of the combined Inbound and Outbound traffic without changing the formatting of my graph? I attempted to use a GPRINT combined with a CDEF that total data sources a+b, and then using |sum:6:current:2:auto|. Unfortunately current will not use the CDEF. Even when the Data Source on the GPRINT is set to None, it will always pick one data source and calculate its sum rather than the sum for the CDEF.

Part B of my question: is it going to be impossible to convert the sum into bytes rather than bits, while still using bits on the rest of the graph?
Last edited by Fëanor on Tue Sep 20, 2011 10:32 pm, edited 1 time in total.
Fëanor
Posts: 10
Joined: Tue Sep 13, 2011 1:41 am

Re: Need Help with Summation

Post by Fëanor »

I was able to accomplish this by using |sum:6:current:2:auto| within the CDEF itself. It may be beneficial to find a way to mention that this is possible somewhere in the documentation. The documentation led me to believe that the summation function was less versatile than it actually is. A small change like this would have helped greatly:

http://docs.cacti.net/manual:087:6_refe ... _variables
Graph Variables
The following variables can be used in the Text Format and Value graph item fields, or in CDEF's (numeric variables only). Below is a description of each of these variables.
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Re: [Solved] Need Help with Summation

Post by gandalf »

Youu may do so on your own. Create a mantis id at http://bugs.cacti.net and use that to log into docs site to change the documentation accordingly
R.
Fëanor
Posts: 10
Joined: Tue Sep 13, 2011 1:41 am

Re: [Solved] Need Help with Summation

Post by Fëanor »

That is great, I'm glad to contribute whatever tiny bit of information that I can. I signed up and attempted to update the doc but received this message when clicking the Edit button in the top right:

"This page is read only. You can view the source, but not change it. Ask your administrator if you think this is wrong."

Is there another way to edit the document that I missed?
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Re: [Solved] Need Help with Summation

Post by gandalf »

You did log into the docs site successfully? And then received that error?
R.
noname
Cacti Guru User
Posts: 1566
Joined: Thu Aug 05, 2010 2:04 am
Location: Japan

Re: [Solved] Need Help with Summation

Post by noname »

gandalf wrote:You did log into the docs site successfully? And then received that error?
Most of pages are editable except manuals.
(Under manuals, we can see "show pagesource" button but can't see "edit this page".)
Fëanor
Posts: 10
Joined: Tue Sep 13, 2011 1:41 am

Re: [Solved] Need Help with Summation

Post by Fëanor »

Sorry for the delay, but yes this was after successfully logging into the docs site with the new mantis id. noname is correct and it was indeed a manual page that I was trying to update.
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest