[mrtg] Re: cfgmaker --ifdesc=alias option doesnt work

Daniel J McDonald dan.mcdonald at austinenergy.com
Mon May 19 14:06:37 MEST 2003


On Sat, 2003-05-17 at 23:23, Cristian Piatnitchi wrote:
> Hi all
> 
> I faced the same problem and I gave up. I supose you are trying to use
> the "description" that you put manualy. You won't be able to do this.

You could in older versions of cfgmaker.  To make it work in a current
version, I had to use a template:

if (not $problem_lines) { 
$target_lines .= <<ONEINTERFACE
Target[$target_name]: $if_ref:$router_connect
routers.cgi*ShortDesc[$target_name]: $html_if_snmp_alias
MaxBytes[$target_name]: $if_speed
Options[$target_name]: bits
WithPeak[$target_name]: wmy
Title[$target_name]: $html_if_snmp_alias
PageTop[$target_name]: <H1>$html_if_snmp_alias - Traffic </H1>
ONEINTERFACE
;
}
else {
    $head_lines="";
    $problem_lines="";
    $target_lines="";
    $separator_lines="";


I called this with:

/usr/local/mrtg-2/bin/cfgmaker --ifref=name --ifdesc=alias
--if-template=bandwidth.temp --output=arouter.cfg public at 1.1.1.1:::::2

I am using routers2.cgi as my rrdtool front-end, thus the routers.cgi*
statement in the template file...

-- 
Daniel J McDonald, CCIE 2495, CNX
Austin Energy


--
Unsubscribe mailto:mrtg-request at list.ee.ethz.ch?subject=unsubscribe
Archive     http://www.ee.ethz.ch/~slist/mrtg
FAQ         http://faq.mrtg.org    Homepage     http://www.mrtg.org
WebAdmin    http://www.ee.ethz.ch/~slist/lsg2.cgi



More information about the mrtg mailing list