| Cheshire Cat Computing https://steveshipway.org/forum/ |
|
| User Defined Graphs https://steveshipway.org/forum/viewtopic.php?f=2&t=1710 |
Page 1 of 1 |
| Author: | scheesman [ Fri Jan 30, 2009 11:54 am ] |
| Post subject: | User Defined Graphs |
Ok, so after browsing throught the book and looking at the online documentation, I finally figured out how to implement Usr Defined Graphs. I have a question about targets, though. Do all targets have to be in the same configuration file? I would like to create a graph that shows totals for all ingress/egress Internet traffic, but the ports are on different devices for redundancy purposes. Just looking at the graph definitions, I'm guessing they do have to be in the same config file. Is this correct? |
|
| Author: | babydr [ Fri Jan 30, 2009 2:10 pm ] |
| Post subject: | Re: User Defined Graphs |
scheesman , See the attched .cfg.txt file , This NOT to be put in crantab or to allow mtrg daemon to run this but must be available to router2.cgi . note the include's . also note the MANY ': No's . I've added a screen capture of the output to help out . If I miss anything you'll need to know I'm sure Steve will pipe up Hth , JimL .[attachment=1]NO-CRON-local-Branchs-BW.cfg.txt[/attachment][attachment=0]NO-CRON-local-Branchs-BW.PNG[/attachment] |
|
| Author: | scheesman [ Fri Jan 30, 2009 2:41 pm ] |
| Post subject: | Re: User Defined Graphs |
Thanks for the config sample! That kind of makes sense, but I never would have thought about doing it that way. I assume that in this manner, this config needs to be saved in a separate file and processed as normal, and will show up as a separate target? Sean |
|
| Author: | babydr [ Sat Jan 31, 2009 12:15 pm ] |
| Post subject: | Re: User Defined Graphs |
Hello scheesman , No you do not want this to be processed by mtrg . This will only be seen by routers.cgi , This will process the 'include'd configs & then create the configured graphs on access . Hth , JimL |
|
| Author: | stevesh [ Mon Feb 02, 2009 11:49 am ] |
| Post subject: | Re: User Defined Graphs |
What he said. The way we do it here is that we create *.cfg files (processed by MRTG) and *.conf files (for Routers2 only) and set the routers2 directive 'cfgfiles = *.cfg *.conf' to get both sets. Then, some more complex userdefined graphs over multiple devices can be put into a .conf file, using Include: to include the individual devices' configurations, putting before them 'routers.cgi*InMenu[_]:no' and 'routers.cgi*InSummary[_]:no' to conceal the various components from the menus. Then follows the required routers.cgi*Graph directives and so on. You can get odd behaviour with defaults, though, as the default targets are processed after each FILE but remain in force globally. Therefore, if you want the defaults to affect the Targets defined in an included file, you need to define them BEFORE including, not after. The parctical upshot is a new entry in the Devices menu, with Targets corresponding to the newlydefined UserDef graphs. |
|
| Page 1 of 1 | All times are UTC + 12 hours [ DST ] |
| Powered by phpBB® Forum Software © phpBB Group http://www.phpbb.com/ |
|