Graphing miltiple links on one graph?

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

Moderators: Developers, Moderators

Tybio
Cacti User
Posts: 80
Joined: Thu Feb 16, 2006 8:14 am

Graphing miltiple links on one graph?

Post by Tybio »

I've looked around for this and can't figure out how to do it. Perhaps I am just being a bonehead...which is possible.

I have a bunch of routers connected by "N" links (from 1 to 5+). In MRTG I can just put in the targets of the interfaces with a + between them to graph the sum of all of them. Is there a way to do this in Cacti?
User avatar
rony
Developer/Forum Admin
Posts: 6022
Joined: Mon Nov 17, 2003 6:35 pm
Location: Michigan, USA
Contact:

Post by rony »

Yes, manually.

You will have to contruct a graph from the data sources of you choosing.
[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]
Paul Thexton
Posts: 49
Joined: Tue Jan 18, 2005 7:50 am

Post by Paul Thexton »

I put together a template that you can import to combine two data sources a while ago and is available on this thread

I do have templates for more interfaces now, and the CDEF is now a little more intelligent in setting UN values to 0 so that it doesn't break the graph if data for a particular interface isn't available for any given timeslot..

If you want me to export the newer templates for you then I can (but let me know how many itnerfaces you're likely to need graphed), but the one on that thread should be enough to start you on your way.
Tybio
Cacti User
Posts: 80
Joined: Thu Feb 16, 2006 8:14 am

Post by Tybio »

It is normally going to be 4 interfaces, some may be up to 8...but 4 is the norm. Also, they will be large pipes...I don't think it matters as this should just deal with rrd files and thus will not run into counter issues correct?
Paul Thexton
Posts: 49
Joined: Tue Jan 18, 2005 7:50 am

Post by Paul Thexton »

Correct.....

Ok, I've attached templates (with dependencies) for 2,3 and 4 interface combinations... It's easier to use a templated approach if you are going to need a lot of these graphs rather than building them manually every time.

Just create a new graph under the relevant host and choose the corresponding template, then select which datasource you want to be the main, secondary, and additional tertiary data sources from the drop down lists presented.

You can create graphs to show egress interfaces that go outside your network across multiple routers by not specifying a parent host when creating a new graph, but if your cacti system has a *lot* of datasources then this can make it a tad cumbersome and time consuming waiting for the graph creation page to load (as every datasource has to go in every selection box)
Attachments
cacti_graph_template_interface_traffic_bitssec_ifalias_aggregate_3_intfs.xml
3 interfaces aggregate
(30.75 KiB) Downloaded 181 times
cacti_graph_template_interface_traffic_bitssec_ifalias_aggregate_4_intfs.xml
4 interfaces aggregate
(36.61 KiB) Downloaded 275 times
cacti_graph_template_interface_traffic_bitssec_ifalias_aggregate.xml
2 interfaces aggregate
(25.52 KiB) Downloaded 194 times
Tybio
Cacti User
Posts: 80
Joined: Thu Feb 16, 2006 8:14 am

Post by Tybio »

Ok, now I'm getting into the relm of what may be RTFM questions, but I can't find the information in the documentation. Please forgive if I'm missing something obvious.

When I select "New Graph" it always has a default host selected. If I try to just select the template it presents me with a screen that has no dropdowns, just 10ish text boxes.

Where am I entering the relm of stupid n00b? :)
Tybio
Cacti User
Posts: 80
Joined: Thu Feb 16, 2006 8:14 am

Post by Tybio »

Yes, stupid user. I found it! Sorry about that. Testing now, thanks for all the help so far :)
Tybio
Cacti User
Posts: 80
Joined: Thu Feb 16, 2006 8:14 am

Post by Tybio »

I've run into a small catch.

On the 4 interface template it only seems to save the 4th interface (in/out). I'm not sure what's going on, all the others come up as "None"
Paul Thexton
Posts: 49
Joined: Tue Jan 18, 2005 7:50 am

Post by Paul Thexton »

:o

Erm..... :-? strange! I'll see if I can replicate that here...
Tybio
Cacti User
Posts: 80
Joined: Thu Feb 16, 2006 8:14 am

Post by Tybio »

I was thinking it may be a hashing issue (Not knowing a thing about templates leads people like me into dangerious ground!) so I removed all of the templates and added in just the 4 link version with the same result.

I'm digging into the documentation myself, but this does not look like a simple template to debug...thanks for your continuing help
Tybio
Cacti User
Posts: 80
Joined: Thu Feb 16, 2006 8:14 am

Post by Tybio »

Ok, I've been looking at the templates for most of the morning. anyone out there help me out with what the sequence tags do?

They seem to hold random unique digits, are they meaningfull in any way, or just a sort of ID?
Paul Thexton
Posts: 49
Joined: Tue Jan 18, 2005 7:50 am

Post by Paul Thexton »

No, sorry - the template in my cacti works fine for me each time I try it, I can't replicate the problem that you're having here.
Tybio
Cacti User
Posts: 80
Joined: Thu Feb 16, 2006 8:14 am

Post by Tybio »

I finally figured it out this morning. It seems that some of the associations were broken. Just had to recheck a bunch of boxes in the template and it works fine.

I'm now trying to create versions of your template for 5-9 interfaces doing it the traditional way...which you are right, is painful :)
Tybio
Cacti User
Posts: 80
Joined: Thu Feb 16, 2006 8:14 am

Post by Tybio »

How does the CDEF link to the template? I see that there are variables, such as "a b c d" etc, but I'm unclear as to how data is subsituted into them when the rrdtool call is made?
Tybio
Cacti User
Posts: 80
Joined: Thu Feb 16, 2006 8:14 am

Post by Tybio »

So I've got it looking good, but the graph will not generate (How good can it look eh?)

Any idea what I'm doing wrong with the cdef?
ERROR: invalid rpn expression 'a,UN,0,a,IF,c,UN,0,c,IF,+,e,UN,0,e,IF,+,g,UN,0,g,IF,+,i,UN,0,i,IF,+,k,UN,0,k,IF,+,8,*'
CDEF:cdefbc=a,UN,0,a,IF,c,UN,0,c,IF,+,e,UN,0,e,IF,+,g,UN,0,g,IF,+,i,UN,0,i,IF,+,k,UN,0,k,IF,+,8,* \
CDEF:cdefbg=b,UN,0,b,IF,d,UN,0,d,IF,+,f,UN,0,f,IF,+,h,UN,0,h,IF,+,j,UN,0,j,IF,+,l,UN,0,l,IF,+,8,* \
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests