| Cheshire Cat Computing http://www.steveshipway.org/forum/ |
|
| Custom graph from two different CFGs http://www.steveshipway.org/forum/viewtopic.php?f=15&t=1174 |
Page 1 of 2 |
| Author: | Rednarb [ Sat Jul 14, 2007 8:31 am ] |
| Post subject: | Custom graph from two different CFGs |
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 |
|
| Author: | stevesh [ Sat Jul 14, 2007 11:13 am ] |
| Post subject: | |
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. |
|
| Author: | Rednarb [ Sat Jul 14, 2007 11:15 am ] |
| Post subject: | |
That is awesome and makes perfect sense! I'll give it a shot! |
|
| Author: | stevesh [ Sat Jul 14, 2007 11:43 am ] |
| Post subject: | |
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. |
|
| Author: | Rednarb [ Tue Jul 17, 2007 10:41 am ] |
| Post subject: | |
Works great! |
|
| Author: | technicalx [ Fri Dec 14, 2007 8:34 am ] |
| Post subject: | graphing two config file interfaces or devices |
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 |
|
| Author: | stevesh [ Fri Dec 14, 2007 9:35 am ] |
| Post subject: | |
| Author: | technicalx [ Sat Dec 15, 2007 11:45 am ] |
| Post subject: | |
| Author: | stevesh [ Mon Dec 17, 2007 10:21 am ] |
| Post subject: | |
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. |
|
| Author: | technicalx [ Tue Dec 18, 2007 6:45 am ] |
| Post subject: | |
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 !!! |
|
| Page 1 of 2 | All times are UTC + 12 hours [ DST ] |
| Powered by phpBB® Forum Software © phpBB Group http://www.phpbb.com/ |
|