<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!&nbsp; Yep, it was the TABs that I added (in interface-errors.template) to make it more readable.</DIV>
<DIV>&nbsp;</DIV>
<DIV>Thnx!<BR><BR>&gt;&gt;&gt; Steve Shipway &lt;s.shipway@auckland.ac.nz&gt; 11/9/2010 5:22 PM &gt;&gt;&gt;<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?&nbsp; 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>&nbsp;</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>&nbsp;&nbsp;&nbsp; ...</DIV>
<DIV>&nbsp;&nbsp;&nbsp; cfgdir="/home/mrtg/cfgs-err"<BR>&nbsp;&nbsp;&nbsp; workdir="/home/mrtg/workdir"<BR>&nbsp;&nbsp;&nbsp; router="router1"<BR>&nbsp;&nbsp;&nbsp; cfgmaker --global "WorkDir:$workdir/" --global "LogFormat: rrdtool" --if-template=interface-errors.template '--if-filter=$default &amp;&amp; ($if_type==30 || $if_type==32)'&nbsp; --output $cfgdir/$router-err.cfg <A href="mailto:public@$router:::::2" target=_blank>public@$router:::::2</A></DIV>
<DIV>&nbsp;&nbsp;&nbsp; ...</DIV>
<DIV>&nbsp;</DIV>
<DIV>I get:</DIV>
<DIV>&nbsp;&nbsp;&nbsp; Evaluation of the contents in the file</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;&nbsp;&nbsp; interface-errors.template<BR>&nbsp;&nbsp;&nbsp; gave the error</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;&nbsp;&nbsp; "Can't find string terminator "<BR>&nbsp;&nbsp;&nbsp; ECHO" anywhere before EOF at (eval 13) line 26, &lt;IF_TEMPLATE&gt; line 65.<BR>&nbsp;&nbsp;&nbsp; "</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;&nbsp;&nbsp; Exiting cfgmaker<BR></DIV>
<DIV>&nbsp;</DIV>
<DIV>For every "&lt;&lt;ECHO;", I have a terminating ECHO...&nbsp; What obvious thing am I missing?</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;</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>&nbsp;</DIV>
<DIV>if ($if_ok) {</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;my $target_name = $target_name . ".err";<BR>&nbsp;my $directory_name = $directory_name . "err";</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;$head_lines .= &lt;&lt;ECHO;<BR>&nbsp;#&nbsp; Input/output errors&nbsp; for $target_name<BR>&nbsp;#---------------------------------------------------------------------<BR>&nbsp;ECHO</DIV>
<DIV>&nbsp;</DIV>
<DIV><BR>&nbsp;$target_lines .= &lt;&lt;ECHO;</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;Target[$target_name]: ifInErrors.$if_index&amp;ifOutErrors.$if_index:$router_connect * 300<BR>&nbsp;RouterUptime[$target_name]: $router_connect<BR>&nbsp;Directory[$target_name]: $directory_name<BR>&nbsp;YLegend[$target_name]: Error Packets<BR>&nbsp;ShortLegend[$target_name]: /s<BR>&nbsp;Legend1[$target_name]: Error Packets<BR>&nbsp;ShortLegend[$target_name]: /s<BR>&nbsp;Legend1[$target_name]: Error Packets<BR>&nbsp;Legend2[$target_name]:<BR>&nbsp;Legend3[$target_name]: Error Packets<BR>&nbsp;Legend4[$target_name]:<BR>&nbsp;LegendI[$target_name]: &amp;nbsp;Inbound Error Packets:&amp;nbsp;<BR>&nbsp;LegendO[$target_name]: &amp;nbsp;Outbound Error Packets:&amp;nbsp;<BR>&nbsp;MaxBytes[$target_name]: 1000<BR>&nbsp;Options[$target_name]: growright, nopercent, unknaszero<BR>&nbsp;Title[$target_name]: $router_name $if_ref Errors<BR>&nbsp;PageTop[$target_name]: &lt;H1&gt;$router_name $if_ref&lt;/H1&gt;<BR>&nbsp;&lt;TABLE&gt;<BR>&nbsp;&nbsp;&lt;TR&gt;&lt;TD&gt;System:&lt;/TD&gt;&lt;TD&gt;$router_name in $html_syslocation&lt;/TD&gt;&lt;/TR&gt;<BR>&nbsp;&nbsp;&lt;TR&gt;&lt;TD&gt;Maintainer:&lt;/TD&gt;&lt;TD&gt;$html_syscontact&lt;/TD&gt;&lt;/TR&gt;<BR>&nbsp;&nbsp;&lt;TR&gt;&lt;TD&gt;Description:&lt;/TD&gt;&lt;TD&gt; In/Out Error counters &lt;/TD&gt;&lt;/TR&gt;<BR>&nbsp;&nbsp;&lt;TR&gt;&lt;TD&gt;Resource:&lt;/TD&gt;&lt;TD&gt;$if_ref&lt;/TD&gt;&lt;/TR&gt;<BR>&nbsp;&lt;/TABLE&gt;<BR>&nbsp;ECHO<BR>&nbsp;}</DIV>
<DIV>&nbsp;</DIV>
<DIV>#print $target_lines;</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;</DIV><PRE>===================
Texas Transportation Forum
www.texastransportationforum.com
</PRE></DIV></DIV></DIV><PRE>===================
Texas Transportation Forum
www.texastransportationforum.com
</PRE></BODY></HTML>