<HTML dir=ltr><HEAD>
<META http-equiv=Content-Type content="text/html; charset=utf-8">
<STYLE>
<!--
-->
</STYLE>
<STYLE>
<!--
@font-face
        {font-family:Calibri}
@font-face
        {font-family:Tahoma}
@font-face
        {font-family:Verdana}
@font-face
        {font-family:"Arial Narrow"}
@font-face
        {font-family:Webdings}
@font-face
        {font-family:Consolas}
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin-right:0cm;
        margin-left:0cm;
        font-size:12.0pt;
        font-family:"Times New Roman","serif"}
a:link, span.MsoHyperlink
        {color:blue;
        text-decoration:underline}
a:visited, span.MsoHyperlinkFollowed
        {color:purple;
        text-decoration:underline}
pre
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:10.0pt;
        font-family:"Courier New"}
p.MsoListParagraph, li.MsoListParagraph, div.MsoListParagraph
        {margin-right:0cm;
        margin-left:36.0pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif"}
span.HTMLPreformattedChar
        {font-family:Consolas}
span.EmailStyle19
        {font-family:"Calibri","sans-serif";
        color:#1F497D}
.MsoChpDefault
        {font-size:10.0pt}
@page WordSection1
        {margin:72.0pt 72.0pt 72.0pt 72.0pt}
-->
</STYLE>
<STYLE id=owaParaStyle type=text/css>P {margin-top:0;margin-bottom:0;}</STYLE>
<META content="MSHTML 6.00.6000.17092" name=GENERATOR></HEAD>
<BODY lang=EN-NZ style="MARGIN: 4px 4px 1px; FONT: 10pt Tahoma" vLink=purple link=blue fpstyle="1" ocsi="0">
<DIV>Bingo Steve! Yep, it was the TABs that I added (in interface-errors.template) to make it more readable.</DIV>
<DIV> </DIV>
<DIV>Thnx!<BR><BR>>>> Steve Shipway <s.shipway@auckland.ac.nz> 11/9/2010 5:22 PM >>><BR></DIV>
<DIV style="FONT-SIZE: 13px; COLOR: rgb(0,0,0); DIRECTION: ltr; FONT-FAMILY: Tahoma">
<DIV>It is hard to tell from the code you posted earlier, but isn't there a leading space added to the final ECHO line? Remove this, the ECHO should be at the start of the line with no trailing characters.<BR><BR>Steve <BR></DIV>
<DIV><BR>
<DIV style="FONT-SIZE: 13px; FONT-FAMILY: Tahoma">
<DIV style="FONT-SIZE: 13px; FONT-FAMILY: Tahoma"><STRONG>Steve Shipway</STRONG></DIV>
<DIV style="FONT-SIZE: 13px; FONT-FAMILY: Tahoma">University of Auckland ITS</DIV>
<DIV style="FONT-SIZE: 13px; FONT-FAMILY: Tahoma"><EM>UNIX Systems Design Lead</EM></DIV>
<DIV style="FONT-SIZE: 13px; FONT-FAMILY: Tahoma"><A href="mailto:s.shipway@auckland.ac.nz">s.shipway@auckland.ac.nz</A></DIV>
<DIV style="FONT-SIZE: 13px; FONT-FAMILY: Tahoma">Ph: +64 9 373 7599 ext 86487</DIV>
<DIV style="FONT-SIZE: 13px; FONT-FAMILY: Tahoma"><EM></EM> </DIV></DIV></DIV>
<DIV style="FONT-SIZE: 16px; COLOR: rgb(0,0,0); FONT-FAMILY: Times New Roman">
<HR tabIndex=-1>
<DIV id=divRpF267513 style="DIRECTION: ltr"><FONT face=Tahoma color=#000000 size=2><B>From:</B> mrtg-bounces+s.shipway=auckland.ac.nz@lists.oetiker.ch [mrtg-bounces+s.shipway=auckland.ac.nz@lists.oetiker.ch] on behalf of Arvon Griffiths [Arvon.Griffiths@txdot.gov]<BR><B>Sent:</B> Wednesday, 10 November 2010 10:36 a.m.<BR><B>To:</B> mrtg<BR><B>Subject:</B> [mrtg] gvolk's interface-errors.template not working now...<BR></FONT><BR></DIV>
<DIV></DIV>
<DIV>
<DIV>When I run my script:</DIV>
<DIV> ...</DIV>
<DIV> cfgdir="/home/mrtg/cfgs-err"<BR> workdir="/home/mrtg/workdir"<BR> router="router1"<BR> cfgmaker --global "WorkDir:$workdir/" --global "LogFormat: rrdtool" --if-template=interface-errors.template '--if-filter=$default && ($if_type==30 || $if_type==32)' --output $cfgdir/$router-err.cfg <A href="mailto:public@$router:::::2" target=_blank>public@$router:::::2</A></DIV>
<DIV> ...</DIV>
<DIV> </DIV>
<DIV>I get:</DIV>
<DIV> Evaluation of the contents in the file</DIV>
<DIV> </DIV>
<DIV> interface-errors.template<BR> gave the error</DIV>
<DIV> </DIV>
<DIV> "Can't find string terminator "<BR> ECHO" anywhere before EOF at (eval 13) line 26, <IF_TEMPLATE> line 65.<BR> "</DIV>
<DIV> </DIV>
<DIV> Exiting cfgmaker<BR></DIV>
<DIV> </DIV>
<DIV>For every "<<ECHO;", I have a terminating ECHO... What obvious thing am I missing?</DIV>
<DIV> </DIV>
<DIV> </DIV>
<DIV>Here's the template file:</DIV>
<DIV>###############################################################################<BR>#<BR># interface-errors.template v20030106 by <A href="mailto:gvolk@gvolk.com" target=_blank>gvolk@gvolk.com</A><BR>#<BR># The following is a mrtg template that can be used in conjunction with<BR># cfgmaker for automatically building configs for monitoring interface<BR># errors.<BR>#<BR># Usage: cfgmaker --if-template=interface-errors.template <A href="mailto:public@router" target=_blank>public@router</A><BR>#<BR>#<BR># This template is available under the GNU GPL. For more information, please<BR># see <A href="http://www.gnu.org/copyleft/gpl.html" target=_blank>http://www.gnu.org/copyleft/gpl.html</A>.<BR>#<BR>#z<BR># Version History:<BR># 20020806 - Initial Release<BR># 20030106 - Added GPL Licensing Note<BR>#</DIV>
<DIV> </DIV>
<DIV>if ($if_ok) {</DIV>
<DIV> </DIV>
<DIV> my $target_name = $target_name . ".err";<BR> my $directory_name = $directory_name . "err";</DIV>
<DIV> </DIV>
<DIV> $head_lines .= <<ECHO;<BR> # Input/output errors for $target_name<BR> #---------------------------------------------------------------------<BR> ECHO</DIV>
<DIV> </DIV>
<DIV><BR> $target_lines .= <<ECHO;</DIV>
<DIV> </DIV>
<DIV> Target[$target_name]: ifInErrors.$if_index&ifOutErrors.$if_index:$router_connect * 300<BR> RouterUptime[$target_name]: $router_connect<BR> Directory[$target_name]: $directory_name<BR> YLegend[$target_name]: Error Packets<BR> ShortLegend[$target_name]: /s<BR> Legend1[$target_name]: Error Packets<BR> ShortLegend[$target_name]: /s<BR> Legend1[$target_name]: Error Packets<BR> Legend2[$target_name]:<BR> Legend3[$target_name]: Error Packets<BR> Legend4[$target_name]:<BR> LegendI[$target_name]: &nbsp;Inbound Error Packets:&nbsp;<BR> LegendO[$target_name]: &nbsp;Outbound Error Packets:&nbsp;<BR> MaxBytes[$target_name]: 1000<BR> Options[$target_name]: growright, nopercent, unknaszero<BR> Title[$target_name]: $router_name $if_ref Errors<BR> PageTop[$target_name]: <H1>$router_name $if_ref</H1><BR> <TABLE><BR> <TR><TD>System:</TD><TD>$router_name in $html_syslocation</TD></TR><BR> <TR><TD>Maintainer:</TD><TD>$html_syscontact</TD></TR><BR> <TR><TD>Description:</TD><TD> In/Out Error counters </TD></TR><BR> <TR><TD>Resource:</TD><TD>$if_ref</TD></TR><BR> </TABLE><BR> ECHO<BR> }</DIV>
<DIV> </DIV>
<DIV>#print $target_lines;</DIV>
<DIV> </DIV>
<DIV> </DIV><PRE>===================
Texas Transportation Forum
www.texastransportationforum.com
</PRE></DIV></DIV></DIV><PRE>===================
Texas Transportation Forum
www.texastransportationforum.com
</PRE></BODY></HTML>