<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> ...</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">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">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> </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></BODY></HTML>