|
|
| Author |
Message |
widowss
Joined: 24 Aug 2008 Posts: 2
|
Posted: Sun Aug 24, 2008 6:17 pm Post subject: help me to combine the datas |
|
|
thanks jas0420 very much , i still have some problems ,
firstly ,i will describe what i want to be. i want to add all the onlines users .
there are 3 data soruces. for example , 52g1,52g2,52g3
first key point
the cdef i wrote is a,b,+,c,+
is this right?the copy is below
CDEF's [edit: total 5200g online users]
Name
A useful name for this CDEF.
cdef=a,b,+,c,+
CDEF Items Add
Item Item Value
Item #1 Custom String: a,b,+,c,+ Move Down Move Up Delete
second point is step 35 in your post
since i have 3 data sources ,so i created "Graph Item Inputs",pls see the attachment. the problem is when i click into the first "Graph Item Inputs",i can not find all the graph items,pls see the attach. only the first item " Item #1: AREA (LAST) " there ,why?
third problem is step 44 in your post
there are 3 pull-down, i selected 3 different sources. but ,but, the infomation below this page is "error" , pls see the attach.
i did make mistakes , but i don't know how to correct it, thank you very muck.
| Description: |
|
| Filesize: |
75.27 KB |
| Viewed: |
707 Time(s) |

|
| Description: |
| i can not find all the graph items |
|
| Filesize: |
76.41 KB |
| Viewed: |
707 Time(s) |

|
| Description: |
| i can not find all the graph items |
|
| Filesize: |
81.07 KB |
| Viewed: |
707 Time(s) |

|
|
|
| Back to top |
|
 |
dbuchner
Joined: 13 Mar 2008 Posts: 13 Location: Sydney
|
Posted: Sun Aug 24, 2008 11:48 pm Post subject: |
|
|
HI,
I am trying to figure out where I am going wrong with the CDEF's/calc which I am trying to graph and would appreciate some feedback/comments to solve this.
I am trying to create an aggregate graph of two CPU graphs. Each CPU graph has System, User and Nice DS' available.
To calculate the total CPU utilization I combine System (Kernel+Wait) with User to get the total CPU utilization of the host. (6 DEF's total per host)
Each graph has an additional Total line showing.
When aggregating the two graphs the calculations no longer correct since rrd tries to total all DEF's and then devide by two. To make this very simple on my feeble brain I removed the Max DEF's as well since I am not really interested in these anyway. Leaving 3 DEF's per host which require totaling on a per host type basis.
| Code: | DEF:a="/usr/local/apache2/htdocs/rra/ngpmr1dr01_cpu_system_911.rrd":cpu_system:AVERAGE \
DEF:c="/usr/local/apache2/htdocs/rra/ngpmr1dr01_cpu_user_912.rrd":cpu_user:AVERAGE \
DEF:e="/usr/local/apache2/htdocs/rra/ngpmr1dr01_cpu_nice_910.rrd":cpu_nice:AVERAGE \
DEF:g="/usr/local/apache2/htdocs/rra/ngpmr1dr02_cpu_system_914.rrd":cpu_system:AVERAGE \
DEF:i="/usr/local/apache2/htdocs/rra/ngpmr1dr02_cpu_user_915.rrd":cpu_user:AVERAGE \
DEF:ba="/usr/local/apache2/htdocs/rra/ngpmr1dr02_cpu_nice_913.rrd":cpu_nice:AVERAGE \ |
I figured I would be able to do this with a CDEF such as a,c,+e and g,i,+ba but this simply returns an error - Invalid rpn expression.
I tried a few other combinations as well such as: cdefa,cdefc,cdefe,+,cdefg,cdefi,cdefba,+
I've even gone and tried this with less DEF's such as (a+b) - (b+d) - no luck.
Any info would be much appreciated.
Dan
|
|
| Back to top |
|
 |
niobe Cacti User
Joined: 10 Mar 2008 Posts: 125 Location: Australia
|
Posted: Wed Oct 08, 2008 8:28 pm Post subject: |
|
|
Responding to Jason's original reply on page 1.
This is a cool solution, however after much playing I discovered there is a critical limitation - it won't work for an arbitrary number of hosts, it has to be the 8 or 'n' that you set in the graph template.
This is a problem for me as I want a generic method for totalling a variable number of hosts.
Specifically I want to aggregate the number of users on subsets of my 180 wireless access points. The APs are actually grouped by subnet. First group may have 8 APs, then next 54, the next 31 and so on, i.e. a variable number of hosts on each aggregate graph.
In this solultion I need a new template to cater for each number in my group. But what happens when I add a new AP to one group? Then I have to redo my templates.
I am trying to work out alternatives, and I think the only way may be a script that accesses the existing data sources and outputs a new aggregate data source. The script will take an argument such as 'hostname_regexp' or 'host_template_id' to determine groupings, and therefore which DS to access.
I believe this is different to the way the aggregate plugin works since it does not create a new data source, just graphs the existing DS on the same graph.
Any thoughts?
|
|
| Back to top |
|
 |
gandalf Developer
Joined: 02 Dec 2004 Posts: 12295 Location: Muenster, Germany
|
Posted: Thu Oct 09, 2008 3:44 pm Post subject: |
|
|
Your statements are correct, IMHO. In a discussion in my company, we were already talking about some kind of "generic, dynamical, self-generating aggregate" which builds the graph based on a regexp filter of any kind (not limited to a host filter).
But this concepts does not fit in any known way (at least not known to me) into current cacti, because the graph would be generated from scratch at graph display time ...
Reinhard
|
|
| Back to top |
|
 |
niobe Cacti User
Joined: 10 Mar 2008 Posts: 125 Location: Australia
|
Posted: Thu Oct 09, 2008 6:08 pm Post subject: |
|
|
| gandalf wrote: | Your statements are correct, IMHO. In a discussion in my company, we were already talking about some kind of "generic, dynamical, self-generating aggregate" which builds the graph based on a regexp filter of any kind (not limited to a host filter).
But this concepts does not fit in any known way (at least not known to me) into current cacti, because the graph would be generated from scratch at graph display time ...
Reinhard |
That's interesting, but I am not sure I follow you.. I always assumed that cacti generates graphs on the fly. Isn't that how rrdtool is designed and a major difference from mrtg?
|
|
| Back to top |
|
 |
gandalf Developer
Joined: 02 Dec 2004 Posts: 12295 Location: Muenster, Germany
|
Posted: Fri Oct 10, 2008 7:10 am Post subject: |
|
|
Yes, it generates graphs on the fly. But the graph's structure is defined by the graph template. E.g. the number of graph items is fixed.
Now, we want to make a more powerful graph template. It shall be able to accumulate several items based on some generic filter expression. For each those items, it should graph e.g. a LINEx along with 3 lines of LEGEND.
This will lead to graphs that sometimes only habe one item, the next one will have e.g. 42 items ...
Am I clear enough now?
Reinhard
|
|
| Back to top |
|
 |
niobe Cacti User
Joined: 10 Mar 2008 Posts: 125 Location: Australia
|
Posted: Fri Oct 10, 2008 10:44 pm Post subject: |
|
|
| gandalf wrote: | Yes, it generates graphs on the fly. But the graph's structure is defined by the graph template. E.g. the number of graph items is fixed.
Now, we want to make a more powerful graph template. It shall be able to accumulate several items based on some generic filter expression. For each those items, it should graph e.g. a LINEx along with 3 lines of LEGEND.
This will lead to graphs that sometimes only habe one item, the next one will have e.g. 42 items ...
Am I clear enough now?
Reinhard |
Yes, fully understand. How about creating a handful of templates with fixed number of items (e.g. 10,25,50,100), then the script will return a unique data source with value '0' for any difference. Must be unique data source else duplicates will be filtered I think. The scripts will assume you have assigned the right template. So if the template has 10 items and the result 11, just truncate the result to 10. Bit hackish but still easier than doing a template manually for each graph. The trick will be to filter the zero data sources from the legend, but they won't affect the shape of the graph.
Another idea would be for the script to create the template of the correct length the first time it is run, but that is definitely hackish!
|
|
| Back to top |
|
 |
|
Powered by phpBB © 2001, 2005 phpBB Group
|
|