Agreggating router interfaces into one graph - plus total

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

Moderators: Developers, Moderators

User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

It is possible to create a Graph Template out of this. Wether this is of more use should be left over to you, but lets start:
  • Goto Graph Management, check the checkbox to the right of your graph and select Duplicate from the actions Dropdown
  • now check the just created duplicate and select Convert to Graph Template from the dropdown (this procedure preserves you already created graph)
  • goto this Graph Template, if you now want to change the Text Formats of the legend lines. It would be nice to use some vairiables here, but this is an already requested feature, not yet available
  • change back to Graph Management, Add a new Graph and select the newly generated Graph Template as the Selected Graph Template, click Create
  • now select each wanted data source as Supplemental Graph Template Data. It part may be time consuming if you're already running a considerable amount of data sources
Be warned! This only works, if the Graph Template has exactly the correct amount of data sources, e.g. if your Template holds 16 ds and you've only got 15, you will need some "dummy" empty data source to just fill up the Template

Hope this is clear enough
By publishing this, I'm not considering the procedure as "easy to understand" or even "time saving". But I have not had enough time for a multi-purpose multi-data-source select Graph Generator (the blueprints are ready), and my php skills are not that good.

Reinhard
tony_yao
Posts: 25
Joined: Sun May 28, 2006 9:54 pm

The total value isn't right

Post by tony_yao »

The two data source choiced "Interfaces bytes/sec total bandwith",and I followed the instrustion to do. But the value of total isn't right.
What's problem cause this?
Attachments
total image
total image
untitled.JPG (26.26 KiB) Viewed 9752 times
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

Please click the wrench next to the graph and post the whole rrdtool graph statement found
Reinhard
tony_yao
Posts: 25
Joined: Sun May 28, 2006 9:54 pm

rrdtool graph

Post by tony_yao »

lvm wrote:Please click the wrench next to the graph and post the whole rrdtool graph statement found
Reinhard
RRDTool Command:

c:/rrdtool/rrdtool.exe graph - \
--imgformat=PNG \
--start=-86400 \
--end=-300 \
--title="linkproof-1 total inbound" \
--base=1000 \
--height=120 \
--width=500 \
--alt-autoscale-max \
--lower-limit=0 \
--vertical-label="" \
--slope-mode \
DEF:a="C\:/apache/Apache2/cacti/rra/linkproof1_traffic_in_13.rrd":traffic_in:AVERAGE \
DEF:b="C\:/apache/Apache2/cacti/rra/linkproof1_traffic_in_12.rrd":traffic_in:AVERAGE \
DEF:c="C\:/apache/Apache2/cacti/rra/linkproof1_traffic_in_12.rrd":traffic_in:AVERAGE \
CDEF:cdefi=TIME,1149556251,GT,a,a,UN,0,a,IF,IF,TIME,1149556251,GT,c,c,UN,0,c,IF,IF,TIME,1149556251,GT,c,c,UN,0,c,IF,IF,+,+ \
AREA:a#00FF00:"SHNAP" \
GPRINT:a:LAST:"Current\:%8.2lf %s" \
GPRINT:a:AVERAGE:"Average\:%8.2lf %s" \
GPRINT:a:MAX:"Maximum\:%8.2lf %s\n" \
AREA:c#00BF47:"STNC":STACK \
GPRINT:c:LAST:"Current\:%8.2lf %s" \
GPRINT:c:AVERAGE:"Average\:%8.2lf %s" \
GPRINT:c:MAX:"Maximum\:%8.2lf %s\n" \
LINE2:cdefi#FF6044:"Total" \
GPRINT:cdefi:LAST:"Current\:%8.2lf %s" \
GPRINT:cdefi:AVERAGE:"Average\:%8.2lf %s" \
GPRINT:cdefi:MAX:"Maximum\:%8.2lf %s\n"
RRDTool Says:

OK
tony_yao
Posts: 25
Joined: Sun May 28, 2006 9:54 pm

the third data source is wrong.

Post by tony_yao »

I find the error, the third data source is wrong.
The data source must be choiced none in total line.
prune
Posts: 23
Joined: Sun Sep 11, 2005 9:51 am
Location: Paris, France
Contact:

Post by prune »

Hi,

is there a way to make the legend (often "inbound" or "outbound") to be dynamicaly set depending on the host data source ?

I'm trying to do a graph with agregation of traffic from different hosts (routers). I would like to have the name of each router or interface in the legend...

Thanks.
--
Prune
(Dual G5/4go/RAID)
User avatar
rony
Developer/Forum Admin
Posts: 6022
Joined: Mon Nov 17, 2003 6:35 pm
Location: Michigan, USA
Contact:

Post by rony »

Not dynamically.
[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]
User avatar
TheWitness
Developer
Posts: 17047
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

I can quite easily see a dropdown from the Data Sources screen, where you would follow the following process:

Code: Select all

1) Select all the data sources that you want aggregate graph fo
2) From the Drop Down, Select "Create Aggregate Graph"
3) Press "Go"
4) In the Code do the following
    a) Verify all Data Sources are of the same type
    b) Prompt the user for "which" data sources will be used in consolidated graph.
    c) Provide Type of Line, or Stack
    d) Name the Graph
    e) Name the Resulting Legends
    f) Pick Gprint types (MAX, MIN, AVG, CUR)
    g) Pick colors for each Data Source
    h) Create graph using Cacti internal functions.
5) Be well and prosper.
Only problem is that, unfortunately, there is not time enough in the day for us to get to this as well as cover the boards and work our various development efforts.

TheWitness
True understanding begins only when we realize how little we truly understand...

Life is an adventure, let yours begin with Cacti!

Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages


For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
joec22
Posts: 5
Joined: Mon Oct 03, 2005 12:15 pm

Post by joec22 »

My totals are also incorrect. Can anyone help me figure out what the problem is? Thanks

Code: Select all

/usr/bin/rrdtool graph - \
--imgformat=PNG \
--start=-86400 \
--end=-300 \
--title="Pt to Pt Traffic" \
--base=1000 \
--height=300 \
--width=600 \
--alt-autoscale-max \
--lower-limit=0 \
--vertical-label="" \
--slope-mode \
DEF:a="/var/www/localhost/htdocs/cacti/rra/cisco_2500li_panther_traffic_in_421.rrd":traffic_in:AVERAGE \
DEF:b="/var/www/localhost/htdocs/cacti/rra/cisco_2500li_panther_traffic_in_422.rrd":traffic_in:AVERAGE \
DEF:c="/var/www/localhost/htdocs/cacti/rra/cisco_2500li_panther_traffic_in_421.rrd":traffic_out:AVERAGE \
DEF:d="/var/www/localhost/htdocs/cacti/rra/cisco_2500li_panther_traffic_in_422.rrd":traffic_out:AVERAGE \
CDEF:cdefa=a,8,* \
CDEF:cdefe=b,8,* \
CDEF:cdefi=c,8,* \
CDEF:cdefbc=d,8,* \
CDEF:cdefbg=TIME,1158160692,GT,a,a,UN,0,a,IF,IF,TIME,1158160692,GT,b,b,UN,0,b,IF,IF,TIME,1158160692,GT,c,c,UN,0,c,IF,IF,TIME,1158160692,GT,d,d,UN,0,d,IF,IF,+,+,+,8,* \
CDEF:cdefbh=TIME,1158160692,GT,a,a,UN,0,a,IF,IF,TIME,1158160692,GT,b,b,UN,0,b,IF,IF,TIME,1158160692,GT,c,c,UN,0,c,IF,IF,TIME,1158160692,GT,d,d,UN,0,d,IF,IF,+,+,+,8,* \
AREA:cdefa#4444FF:"Se0"  \
GPRINT:a:LAST:"   Current\:%8.2lf %s"  \
GPRINT:a:AVERAGE:"Average\:%8.2lf %s"  \
GPRINT:a:MAX:"Maximum\:%8.2lf %s\n"  \
AREA:cdefe#4444FF:"Se1":STACK \
GPRINT:b:LAST:"Current\:%8.2lf %s"  \
GPRINT:b:AVERAGE:"Average\:%8.2lf %s"  \
GPRINT:b:MAX:"Maximum\:%8.2lf %s\n"  \
AREA:cdefi#FFC73B:"Se0":STACK \
GPRINT:c:LAST:"   Current\:%8.2lf %s"  \
GPRINT:c:AVERAGE:"Average\:%8.2lf %s"  \
GPRINT:c:MAX:"Maximum\:%8.2lf %s\n"  \
AREA:cdefbc#FFC73B:"Se1":STACK \
GPRINT:d:LAST:"Current\:%8.2lf %s"  \
GPRINT:d:AVERAGE:"Average\:%8.2lf %s"  \
GPRINT:d:MAX:"Maximum\:%8.2lf %s\n"  \
LINE2:cdefbg#000000:"Total"  \
GPRINT:cdefbh:LAST:"Current\:%8.2lf %s"  \
GPRINT:cdefbh:AVERAGE:"Average\:%8.2lf %s"  \
GPRINT:cdefbh:MAX:"Maximum\:%8.2lf %s\n" 
Attachments
graph_image.JPG
graph_image.JPG (60.82 KiB) Viewed 9375 times
eddievenus
Cacti User
Posts: 60
Joined: Mon Jul 18, 2005 7:01 pm

Post by eddievenus »

What would be the right process to go about requesting this to be offically added as mentioned in Larry's post?

I am asking because I have done this now 5 times, and despite the fact that it gets slightly easier each time, it does not get much faster. I will probably end up doing about 80 more of these eventually. Anything that makes this process less tedious is always welcome.

I am already so impressed with most of this project that I hate to ask you to add this in, given your already overburdened workload, but it seems to me that this is a pretty cool way to set Cacti apart from the other SNMP interface polling projects. This is not to say that Cacti does not already stand head and shoulders above the pack, but it sounds like adding this may not be all that far away from happening already.

I for one would vote to have this included in the next release, or sooner even, if that is possible.

EV
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

There would be a way of improving the current way of creating such graphs.
This is possible, if you have to create lots of graphs that hold the same number of items, with same LINE/AREA/STACK arrangements, same colors and same GPRINTs.

It would go like:
Create _one_ graph as you are doing now
Copy this one from Graph Management
Select the copy and convert it into Graph Template (see dropdown action)
Make all ds of the Graph Template generic

Now, when creating a new graph, you may add an new one from Graph Management, selecting the new Graph Template. Then you would be prompted with a list of ds's to be filled. Select those you like for the new Graph.

Of course, even this workaround is tedious enough. But it would allow for some "generic overview graph templates"

Reinhard
User avatar
TheWitness
Developer
Posts: 17047
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

It's a full weekend job Reinhard, I just have too much going on right now.

Larry
True understanding begins only when we realize how little we truly understand...

Life is an adventure, let yours begin with Cacti!

Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages


For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

TheWitness wrote:It's a full weekend job Reinhard, I just have too much going on right now.

Larry
oops, my comment was _not_ aimed at you
Reinhard
plustotal
Posts: 7
Joined: Mon Oct 30, 2006 8:09 am

Post by plustotal »

Hello,

Is it possible to create one graph with the active citrix users from more servers?

If it is possible, can you explain to a newbie how exactly did you do that?

Thanks

I have read this threat, but I don't know how to 'translate' the cdef for the bytes en bite, into a cdef for active users from different servers.
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

plustotal wrote:I have read this threat, but I don't know how to 'translate' the cdef for the bytes en bite, into a cdef for active users from different servers.
This CDEF is not mandatory. It is required only, when translating Bytes into Bits. As your "user count" would normally not be measured in units of Bytes :wink: , simply leave this off
Reinhard
Post Reply

Who is online

Users browsing this forum: No registered users and 6 guests