| Cheshire Cat Computing http://www.steveshipway.org/forum/ |
|
| Description in mrtg cfg not in web page http://www.steveshipway.org/forum/viewtopic.php?f=2&t=1107 |
Page 1 of 1 |
| Author: | arobel [ Sat May 12, 2007 7:48 am ] |
| Post subject: | Description in mrtg cfg not in web page |
Hello, I'm trying to get the webpage to display the Interface description from the table in the mrtg cfg. Here is my cfg. I'm sure this is an easy fix, but can't find anything online that tells me how to do this. So in the webpage I would like to see: Description: Serial0/0/0 ELI: xxxxxxxxx-xxxxx 1.800.xxx.xxxx Target[172.xx.x.1_Serial0_0_0]: \Serial0/0/0:34re546@172.xx.x.x: SetEnv[172.xx.x.x_Serial0_0_0]: MRTG_INT_IP="172.xx.x.x" MRTG_INT_DESCR="Serial0/0/0" MaxBytes[172.xx.x.x_Serial0_0_0]: 193000 Title[172.22.1.1_Serial0_0_0]: #Se0/0/0 -- Westin2811 PageTop[172.xx.x.x_Serial0_0_0]: <H1>#Se0/0/0 -- Westin2811</H1> <TABLE> <TR><TD>System:</TD> <TD>Westin2811 in </TD></TR> <TR><TD>Maintainer:</TD> <TD></TD></TR> <TR><TD>Description:</TD><TD>Serial0/0/0 ELI: xxxxxxxxx-xxxxx 1.800.xxx.xxxx </TD></TR> <TR><TD>ifType:</TD> <TD>propPointToPointSerial (22)</TD></TR> <TR><TD>ifName:</TD> <TD>Se0/0/0</TD></TR> <TR><TD>Max Speed:</TD> <TD>1544.0 kbits/s</TD></TR> <TR><TD>Ip:</TD> <TD>172.xx.x.x ()</TD></TR> |
|
| Author: | stevesh [ Mon May 14, 2007 11:31 am ] |
| Post subject: | |
You have two options. Note that the 'Description' is actually just part of the PageTop text, not a separate definition given to MRTG. As far as routers2 is concerned, you've just got a big block of text. Option 1 is to enable displaying the PageTop text. This can make the pages a bit cluttered (which is why it is disabled). To do this, edit your routers2.conf and uncomment the 'mrtgpagetop=yes' option. Option 2 is to enable a bit of AI code. The default interface description is pulled from all sorts of places, but it can also be told to get it by parsing a PageTop that has been generated by cfgmaker. This is a bit of an inexact science, though, hence it is normally disabled. To enable it, look for the [targetnames] section of the routers2.conf and the 'routerdefault' and 'ifdefault' options. Either or both of these can be set to 'cfgmaker' to try parsing the PageTop text. For your example, ifdefault=cfgmaker should be enough to achieve what you want. |
|
| Author: | arobel [ Tue May 15, 2007 11:11 am ] |
| Post subject: | |
| Author: | stevesh [ Tue May 15, 2007 12:55 pm ] |
| Post subject: | |
If you make changes to your router, you will need to rerun cfgmaker to regenerate the .cfg file. The process used in identifying what to call the targets (interfaces) within routers2 is long and convoluted and detailed in the documentation. If you have any 'routers.cgi*ShortName[]:' or 'SetEnv[]: MRTG_INT_DESCR=""' settings in the .cfg file, then these will be used in preference - the ifdefault=cfgmaker option only kicks in if nothing explicit is defined for a description. I'd forgotten about this, so from your config snippet above it looks like your MRTG_INT_DESCR is being set so this will take priority. Maybe I should make the cfgmaker option ignore this... You may want to modify cfgmaker (if you can write Perl code) to set the options in your favourite way. |
|
| Page 1 of 1 | All times are UTC + 12 hours [ DST ] |
| Powered by phpBB® Forum Software © phpBB Group http://www.phpbb.com/ |
|