<HTML xmlns="http://www.w3.org/TR/REC-html40" xmlns:v = "urn:schemas-microsoft-com:vml" xmlns:o = "urn:schemas-microsoft-com:office:office" xmlns:w = "urn:schemas-microsoft-com:office:word" xmlns:m = "http://schemas.microsoft.com/office/2004/12/omml"><HEAD>
<META http-equiv=Content-Type content="text/html; charset=utf-8">
<META content="MSHTML 6.00.6000.17092" name=GENERATOR>
<STYLE>
v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</STYLE>

<STYLE>
<!--
 /* Font Definitions */
 @font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
        {font-family:Verdana;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
        {font-family:"Arial Narrow";
        panose-1:2 11 6 6 2 2 2 3 2 4;}
@font-face
        {font-family:Webdings;
        panose-1:5 3 1 2 1 5 9 6 7 3;}
@font-face
        {font-family:Consolas;
        panose-1:2 11 6 9 2 2 4 3 2 4;}
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
        {mso-margin-top-alt:auto;
        margin-right:0cm;
        mso-margin-bottom-alt:auto;
        margin-left:0cm;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";
        mso-believe-normal-left:yes;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
pre
        {mso-style-priority:99;
        mso-style-link:"HTML Preformatted Char";
        margin:0cm;
        margin-bottom:.0001pt;
        font-size:10.0pt;
        font-family:"Courier New";}
p.MsoListParagraph, li.MsoListParagraph, div.MsoListParagraph
        {mso-style-priority:34;
        mso-margin-top-alt:auto;
        margin-right:0cm;
        mso-margin-bottom-alt:auto;
        margin-left:36.0pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
span.HTMLPreformattedChar
        {mso-style-name:"HTML Preformatted Char";
        mso-style-priority:99;
        mso-style-link:"HTML Preformatted";
        font-family:Consolas;}
span.EmailStyle19
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
        {page:WordSection1;}
 /* List Definitions */
 @list l0
        {mso-list-id:1731540366;
        mso-list-type:hybrid;
        mso-list-template-ids:197527630 336134161 336134169 336134171 336134159 336134169 336134171 336134159 336134169 336134171;}
@list l0:level1
        {mso-level-text:"%1\)";
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;}
-->
</STYLE>
</HEAD>
<BODY lang=EN-NZ style="MARGIN: 4px 4px 1px; FONT: 10pt Tahoma" vLink=purple link=blue>
<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">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">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">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">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></BODY></HTML>