[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4688: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4690: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4691: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4692: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
Cheshire Cat Computing • View topic - Custom graph from two different CFGs

Cheshire Cat Computing

Software support and information
It is currently Tue Nov 11, 2025 7:15 am

All times are UTC + 12 hours [ DST ]




Post new topic Reply to topic  [ 11 posts ]  Go to page 1, 2  Next
Author Message
PostPosted: Sat Jul 14, 2007 8:31 am 
Offline
Contributor

Joined: Thu Dec 29, 2005 1:09 pm
Posts: 58
Just want to check if this is possible and/or some recommendations as to getting this done.

Scenario: Two 'border' routers providing our connection to the Internet. Each one is connected to a DS3 from different carriers and BGP is used to determine the best path in and out.

I'd like to create a custom graph that includes both HSSI interface statistics combined so at a glance I can see our true total bandwidth usage.

I have two different config files, one for each router. Certainly I could create a 3rd CFG (or a new target in an existing CFG) to gather the data from the interfaces a 2nd time, add them together, and graph the result. However, in the interest in optimization, I'd much prefer to use the RRDs that already contain the data. In addition, I wouldn't mind seeing this custom graph when I view either of the router's summaries.

Seems like a lot to ask for, and I'm really just curious if and how it can be done.

What're your thoughts?

TIA,

Eric Brander


Top
 Profile Send private message  
 
 Post subject:
PostPosted: Sat Jul 14, 2007 11:13 am 
Offline
Site Admin

Joined: Tue Jul 29, 2003 11:42 am
Posts: 3039
Location: Auckland, New Zealand
We do something very similar here, so it is possible.

The way to do it is like this:

Create a new .cfg file, but one that is *NOT* run by MRTG. It is only for the benefit of routers2.
This cfg file contains Include: statements to include the two .cfg files corresponding to the routers.
Then it also contains statements for routers.cgi*InMenu[xxx]:no for each of the targets in the two cfg files. Probably you can do this using the default target, routers.cgi*InMenu[_]:no. You probably will want routers.cgi*InOut[_]:no and routers.cgi*InSummary[_]:no as well.
Then, you add routers.cgi*Graph[] statements for the two targets that you want to add. Make sure you have the withtotal option, and set routers.cgi*InMenu[xxxx]:yes for the userdefined graph name.

This will result in a new Device in the routers.cgi menu for the combined .cfg file, and this Device will contain one Target, the userdefined graph which holds the two interfaces and their total traffic.

If you have problems, then email me directly copies of the two .cfg files, I'll send you a summary.cfg files that should do the job.

_________________
Steve Shipway
UNIX Systems, ITSS, University of Auckland, NZ
Woe unto them that rise up early in the morning... -- Isaiah 5:11


Top
 Profile Send private message  
 
 Post subject:
PostPosted: Sat Jul 14, 2007 11:15 am 
Offline
Contributor

Joined: Thu Dec 29, 2005 1:09 pm
Posts: 58
That is awesome and makes perfect sense! I'll give it a shot!


Top
 Profile Send private message  
 
 Post subject:
PostPosted: Sat Jul 14, 2007 11:43 am 
Offline
Site Admin

Joined: Tue Jul 29, 2003 11:42 am
Posts: 3039
Location: Auckland, New Zealand
Here, we have config files with two names -- *.cfg and *.conf. The *.cfg files are all run by MRTG, but routers2 is set to use *.cfg AND *.conf. Thus the special files (such as for this purpose) will be in .conf file. This allows us to easily see which is which, and be confident that all .cfg files are for MRTG.

_________________
Steve Shipway
UNIX Systems, ITSS, University of Auckland, NZ
Woe unto them that rise up early in the morning... -- Isaiah 5:11


Top
 Profile Send private message  
 
 Post subject:
PostPosted: Tue Jul 17, 2007 10:41 am 
Offline
Contributor

Joined: Thu Dec 29, 2005 1:09 pm
Posts: 58
Works great!


Top
 Profile Send private message  
 
PostPosted: Fri Dec 14, 2007 8:34 am 
Offline
Silver User

Joined: Tue Jan 31, 2006 1:58 pm
Posts: 18
saw the response for making one graph that is the output of two different config files (Posted: Tue 17 Jul, 2007 2:41 am ), but it's not working well for me. Probably me...

Anyway, I have three .cfg files that are producing cpu, memory, packets graphs. Each one is a different windows server. works great!

after reading the example of how to create a third file that will use the data already created by each of the three config files, I have tried to get this combined graph. No luck.

we have 3 Citrix servers we are pulling the exact same data from. I have created a file called multi.conf that includes the 3 existing server .cfg files. From there, I have tried several modifications to the .conf file, but still no gold ring.

here is the current .conf file. Any help would be greatly appreciated. Keep up the great work !!!!!


# Global Options
WorkDir: c:/mrtg/wwwroot/servers/multi

RunAsDaemon: Yes
IconDir: C:/mrtg/wwwroot/rrdicons
### Global Defaults
PathAdd: c:/mrtg/rrdtool
LogFormat: rrdtool
#
routers.cgi*InMenu[_]: no
routers.cgi*InOut[_]: no
routers.cgi*InSummary[_]: no
routers.cgi*InCompact[_]: no
#
include: caddie.cfg
include: dormie.cfg
include: stymie.cfg
#
Title[Physmem]: Dallas Citrix Servers -
PageTop[physmem]: <H1> Dallas Citrix Servers - </H1><h2> </h2>
routers.cgi*Graph[caddie.physmem]: Physmem
routers.cgi*Options[caddie.physmem]: fixunit nopercent nomax
routers.cgi*Icon[caddie.physmem]: graph-sm.gif
routers.cgi*InMenu[caddie.physmem]: yes
routers.cgi*Graphstyle[caddie.physmem]: range noaverage nototal
#
routers.cgi*Graph[dormie.physmem]: Physmem
routers.cgi*Options[dormie.physmem]: fixunit nopercent nomax
routers.cgi*Icon[dormie.physmem]: graph-sm.gif
routers.cgi*InMenu[dormie.physmem]: yes
routers.cgi*Graphstyle[dormie.physmem]: range noaverage nototal
#
routers.cgi*Graph[stymie.physmem]: Physmem
routers.cgi*Options[stymie.physmem]: fixunit nopercent nomax
routers.cgi*Icon[stymie.physmem]: graph-sm.gif
routers.cgi*Menu[stymie.physmem]: yes
routers.cgi*Graphstyle[stymie.physmem]: range noaverage nototal
#
routers.cgi*Title[Physmem]: Memory Usage on dallas citrix
routers.cgi*InMenu[Physmem]: yes
routers.cgi*Graphstyle[Physmem]: range noaverage nototal


Top
 Profile Send private message  
 
 Post subject:
PostPosted: Fri Dec 14, 2007 9:35 am 
Offline
Site Admin

Joined: Tue Jul 29, 2003 11:42 am
Posts: 3039
Location: Auckland, New Zealand

_________________
Steve Shipway
UNIX Systems, ITSS, University of Auckland, NZ
Woe unto them that rise up early in the morning... -- Isaiah 5:11


Top
 Profile Send private message  
 
 Post subject:
PostPosted: Sat Dec 15, 2007 11:45 am 
Offline
Silver User

Joined: Tue Jan 31, 2006 1:58 pm
Posts: 18


Top
 Profile Send private message  
 
 Post subject:
PostPosted: Mon Dec 17, 2007 10:21 am 
Offline
Site Admin

Joined: Tue Jul 29, 2003 11:42 am
Posts: 3039
Location: Auckland, New Zealand
This new file you've created looks like a MRTG file, but is actually only for use by routers2, which treats it as a new Device menu entry.

The way I usually indicate this is by naming the file with a .conf extension rather than a .cfg extension. Then, MRTG is set to process all the .cfg files, and routers2 is told (via the cfgfiles directive in the routers2.conf) to process both the *.cfg and the *.conf files. It appears in the routers2 Devices menu as a new Device - you can change the labels in the menu using the 'routers.cgi*ShortName: xxxx' directive.

_________________
Steve Shipway
UNIX Systems, ITSS, University of Auckland, NZ
Woe unto them that rise up early in the morning... -- Isaiah 5:11


Top
 Profile Send private message  
 
 Post subject:
PostPosted: Tue Dec 18, 2007 6:45 am 
Offline
Silver User

Joined: Tue Jan 31, 2006 1:58 pm
Posts: 18
not sure what I'm doing wrong here, Steve. I have two files in my bin directory with a .conf extention...routers2.conf and multi.conf.

the routers2.conf is default except for the path to the config files, rrd files and icons.

[routers.cgi]
# Where the rrd databases are kept - absolute filesystem path
# This is overridden by the WorkDir: directive in the MRTG .conf file, so it
# is not really necessary in here and can (usually) be safely ignored.
# NT users can put a drive letter in - eg, D:\rrdtool\files
# dbpath = c:/mrtg/wwwroot/servers/*.
# Where the graphs are to be created - absolute filesystem path
graphpath = /mrtg/wwwroot/servers
# The URL of the above directory - a URL path, so use '/' as a path separator
graphurl = /servers
#
# Where the MRTG config files live - absolute filesystem path
# NO SPACES allowed in path names, NT people.
confpath = /mrtg/mrtg/bin
# Wildcarded pattern match for MRTG conf files.
# You can put several of these here, separated by spaces.
# Note that these can include a path separator - eg, site*/*.cfg
# This is useful if you split up your MRTG .cfg files over multiple paths.
cfgfiles = *.cfg
#
# Page icons URL - a URL path, which must end with a '/'. Use '/' as path sep.
iconurl = /rrdicons/
#

as you can see, i've tried a few changes to the dbpath. I"ve also changed the variable cfgfiles = *.cfg to include *.conf.

thanx !!!


Top
 Profile Send private message  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 11 posts ]  Go to page 1, 2  Next

All times are UTC + 12 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group