Data Difference

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

Moderators: Developers, Moderators

Post Reply
friskd
Posts: 3
Joined: Fri Apr 17, 2009 11:47 am

Data Difference

Post by friskd »

Looking to create a graph of the difference between two interfaces. We have our traffic out to the Internet graphed, and we have our student traffic portion of that traffic graphed. I would love to graph the total traffic (green) minus student traffic (red) resulting in the admin base traffic.

Currently have two line graphs, so we know the margin between lines is admin traffic, but would love to have that margin be the data for the single total graph.

Any ideas or help on how to do that would be appreciated!

Thanks!
D
Attachments
Current line Graphs
Current line Graphs
overlay.jpg (54.11 KiB) Viewed 924 times
michaelwjoyner
Cacti User
Posts: 52
Joined: Wed Apr 08, 2009 12:24 pm

So basically............

Post by michaelwjoyner »

you want to just graph the ADMIN traffic and not graph the TOTAL and STUDENT?
friskd
Posts: 3
Joined: Fri Apr 17, 2009 11:47 am

correct

Post by friskd »

Correct. But I can't find how or where to do simple subtraction of two data sets to graph that difference...
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

Please use a CDEF. Find help at http://docs.cacti.net/manual:087:6_refe ... cdef#cdefs
Reinhard
michaelwjoyner
Cacti User
Posts: 52
Joined: Wed Apr 08, 2009 12:24 pm

I could be wrong, but I cant wait till the big boys help out

Post by michaelwjoyner »

In CDEF's you can create user defined functions

Its located:

Graph Management > CDEFS


There is a sample function in there A+B. You might check how that is made. It looks rather simple.

I am guessing and I apologize if I am mistaken, but I think that you would create a CDEF for A-B or B-A and use your new CDEF in your graph template.

I will monitor this thread, I am anxious to see if I am right.
michaelwjoyner
Cacti User
Posts: 52
Joined: Wed Apr 08, 2009 12:24 pm

I apologize, it seems like Gandalf and I were posting at the

Post by michaelwjoyner »

same time. HEHE


I guess I was right. You might want to take a look at the CDEF sample.

Cheers
friskd
Posts: 3
Joined: Fri Apr 17, 2009 11:47 am

Yep!

Post by friskd »

Thanks all!

Looks as if the CDEF stuff worked... took a bit to tweak it, but it first adds input 2 and 3 (student traffic primary and failover (something + heartbeat ) ) then subtracts that total from input 1. I had to create a 4th data source (with no datasource associated) to do the final bytes to bits CDEF, but yea...

As I suspected, there is SOME traffic on the Student graph that is not Internet bound (as reflected in the graph as negative traffic), but this give me the rough data we need!

Thanks for your help!
Dave
Attachments
overlay2.jpg
overlay2.jpg (51.72 KiB) Viewed 870 times
Post Reply

Who is online

Users browsing this forum: No registered users and 5 guests