[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/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 - Description in mrtg cfg not in web page

Cheshire Cat Computing

Software support and information
It is currently Wed Nov 12, 2025 8:21 am

All times are UTC + 12 hours [ DST ]




Post new topic Reply to topic  [ 4 posts ] 
Author Message
PostPosted: Sat May 12, 2007 7:48 am 
Offline
User

Joined: Sun Apr 15, 2007 8:33 am
Posts: 5
Location: Seattle
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>


Top
 Profile Send private message  
 
 Post subject:
PostPosted: Mon May 14, 2007 11:31 am 
Offline
Site Admin

Joined: Tue Jul 29, 2003 11:42 am
Posts: 3039
Location: Auckland, New Zealand
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.

_________________
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 May 15, 2007 11:11 am 
Offline
User

Joined: Sun Apr 15, 2007 8:33 am
Posts: 5
Location: Seattle


Top
 Profile Send private message  
 
 Post subject:
PostPosted: Tue May 15, 2007 12:55 pm 
Offline
Site Admin

Joined: Tue Jul 29, 2003 11:42 am
Posts: 3039
Location: Auckland, New Zealand
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.

_________________
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  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC + 12 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 1 guest


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