[mrtg] Indexmaker not Picking up HTML Tag from cfg File

Craig Metzer ucantspamthis at hotmail.com
Mon Jan 29 16:41:47 CET 2007


I'm trying to imbed an HREF in my pages, but I'm having trouble.  I'm puting 
the href in the template file, and it appears to be correct in the cfg file, 
but the html file doesn't have it.  Note the <A href= .... ></A> in the 
PageTop and PageFoot made it to the cfg file but not to the html.  I also 
tried escaping the quotes, but that didn't work either.  The ref doc seems 
to indicate the characters in the CFG file are correct.  Also curious why 
the '\n' didn't work as described in the MRTG Ref document.  I'm probably 
overlooking something simple.  Anyone have a suggestion?

Thanks,
Craig

Sniplets below:

=============
Template:
=============


        my $target_name = $router_name . "-ifinout-" . $if_dir_name;
        $target_lines .= <<ECHO;
# Interface Input/Output for $router_name $if_name $if_snmp_alias
# ------------------------------------------------------------------------

Target[$target_name]: 
ifInOctets.$if_index&ifOutOctets.$if_index:$router_connect_v1
RouterUptime[$target_name]: $router_connect
Directory[$target_name]: $directory_name
YLegend[$target_name]: Bits/Sec
ShortLegend[$target_name]: bps
Legend1[$target_name]: Interface Input Bits per Second
Legend2[$target_name]: Interface Output Bits per Second
Legend3[$target_name]: Maximal Input
Legend4[$target_name]: Maximal Output
LegendI[$target_name]: &nbsp;ifIn bps:&nbsp;
LegendO[$target_name]: &nbsp;ifOut bps:&nbsp;
MaxBytes[$target_name]: $maxby
Options[$target_name]: growright, nopercent, bits
Title[$target_name]: $router_name $if_name $html_if_description I/O bps
PageTop[$target_name]: <H1>$if_name Input/Output bps</H1>\\n
   <TABLE>\\n
     <TR><TD>System:</TD><TD>$router_name in $html_syslocation</TD></TR>\\n
     <TR><TD>Maintainer:</TD><TD>$html_syscontact</TD></TR>\\n
     <TR><TD>Description:</TD><TD>Interface Input/Output bps</TD></TR>\\n
     <TR><TD>Resource:</TD><TD>$if_description $if_name 
$html_if_snmp_alias</TD></TR>\\n
     <TR><TD>OIDi:</TD><TD>mib-2...ifInOctets.$if_index</TD></TR>\\n
     <TR><TD>OIDo:</TD><TD>mib-2...ifOutOctets.$if_index</TD></TR>\\n
   </TABLE>\\n
   <A href="..cgi-bin\/get95.pl?$target_name" target="_blank">Click Here to 
get the 95th Percentile</A>\\n

PageFoot[$target_name]: <A href="..cgi-bin\/get95.pl?$target_name" 
target="_blank">Click Here to get the 95th Percentile</A>

ECHO


=============
CFG File:
=============

### Interface 29 >> Descr: 'ls-0/0/0' | Name: 'ls-0/0/0' | Ip: '10.0.0.1' | 
Eth: 'FF-FF-FF-FF-FF-FF' ###
### Interface Common Description: ls-0/0/0
### Interface Alias:
# Interface Input/Output for my-rtr-01.myloc.mydom.gov ls-0/0/0
# ------------------------------------------------------------------------

Target[my-rtr-01.myloc.mydom.gov-ifinout-ls-0.0.0]: 
ifInOctets.29&ifOutOctets.29:c0mUn1ty at my-rtr-01::2:2:1:1
RouterUptime[my-rtr-01.myloc.mydom.gov-ifinout-ls-0.0.0]: 
c0mUn1ty at my-rtr-01::2:2:1:2
Directory[my-rtr-01.myloc.mydom.gov-ifinout-ls-0.0.0]: 
my-rtr-01.myloc.mydom.gov
YLegend[my-rtr-01.myloc.mydom.gov-ifinout-ls-0.0.0]: Bits/Sec
ShortLegend[my-rtr-01.myloc.mydom.gov-ifinout-ls-0.0.0]: bps
Legend1[my-rtr-01.myloc.mydom.gov-ifinout-ls-0.0.0]: Interface Input Bits 
per Second
Legend2[my-rtr-01.myloc.mydom.gov-ifinout-ls-0.0.0]: Interface Output Bits 
per Second
Legend3[my-rtr-01.myloc.mydom.gov-ifinout-ls-0.0.0]: Maximal Input
Legend4[my-rtr-01.myloc.mydom.gov-ifinout-ls-0.0.0]: Maximal Output
LegendI[my-rtr-01.myloc.mydom.gov-ifinout-ls-0.0.0]: &nbsp;ifIn bps:&nbsp;
LegendO[my-rtr-01.myloc.mydom.gov-ifinout-ls-0.0.0]: &nbsp;ifOut bps:&nbsp;
MaxBytes[my-rtr-01.myloc.mydom.gov-ifinout-ls-0.0.0]: 1024000
Options[my-rtr-01.myloc.mydom.gov-ifinout-ls-0.0.0]: growright, nopercent, 
bits
Title[my-rtr-01.myloc.mydom.gov-ifinout-ls-0.0.0]: my-rtr-01.myloc.mydom.gov 
ls-0/0/0 ls-0/0/0 I/O bps
PageTop[my-rtr-01.myloc.mydom.gov-ifinout-ls-0.0.0]: <H1>ls-0/0/0 
Input/Output bps</H1>\n
   <TABLE>\n
     <TR><TD>System:</TD><TD>my-rtr-01.myloc.mydom.gov in MYLOC</TD></TR>\n
     <TR><TD>Maintainer:</TD><TD>NMC xxx-xxx-xxxx</TD></TR>\n
     <TR><TD>Description:</TD><TD>Interface Input/Output bps</TD></TR>\n
     <TR><TD>Resource:</TD><TD>ls-0/0/0   ls-0/0/0 </TD></TR>\n
     <TR><TD>OIDi:</TD><TD>mib-2...ifInOctets.29</TD></TR>\n
     <TR><TD>OIDo:</TD><TD>mib-2...ifOutOctets.29</TD></TR>\n
   </TABLE>\n
   <A href="..cgi-bin/get95.pl?my-rtr-01.myloc.mydom.gov-ifinout-ls-0.0.0" 
target="_blank">Click Here to get the 95th Percentile</A>\n

PageFoot[my-rtr-01.myloc.mydom.gov-ifinout-ls-0.0.0]: <A 
href="..cgi-bin/get95.pl?my-rtr-01.myloc.mydom.gov-ifinout-ls-0.0.0" 
target="_blank">Click Here to get the 95th Percentile</A>


=============
HTML File:
=============

<H1>ls-0/0/0 Input/Output bps</H1> <TABLE> 
<TR><TD>System:</TD><TD>my-rtr-01.myloc.mydom.gov in MYLOC</TD></TR> 
<TR><TD>Maintainer:</TD><TD>NMC xxx-xxx-xxxx</TD></TR> 
<TR><TD>Description:</TD><TD>Interface Input/Output bps</TD></TR> 
<TR><TD>Resource:</TD><TD>ls-0/0/0   ls-0/0/0 </TD></TR> 
<TR><TD>OIDi:</TD><TD>mib-2...ifInOctets.29</TD></TR> 
<TR><TD>OIDo:</TD><TD>mib-2...ifOutOctets.29</TD></TR> </TABLE>The 
statistics were last updated <strong>Friday, 26 January 2007 at 
13:56</strong>,<br />
at which time <strong>'my-rtr-01'</strong> had been up for <strong>112 days, 
19:55:59</strong>.
<!-- End Head -->

<!-- ...... -->

<H1>Click Here to get the 95th Percentile</H1>

_________________________________________________________________
Turn searches into helpful donations. Make your search count. 
http://click4thecause.live.com/search/charity/default.aspx?source=hmemtagline_donation&FORM=WLMTAG



More information about the mrtg mailing list