[mrtg] Re: cfgmaker output

Pavel Ruzicka pavouk at pavouk.org
Sun Sep 18 13:05:24 MEST 2005


There are probably change, because new html code is more readable than old.
XHTML code doesn't accept  "capital letters" in a tags.
Only small letters are correct.
If you doesn't like it, you can define "template" for cfgmaker.
Call cfgmaker with option like this: 

This template can look like this:
if($if_ok) {
$target_lines .= <<ECHO;
Target[$target_name]: $if_ref:$router_connect
SetEnv[$target_name]: MRTG_INT_IP="$if_ip" MRTG_INT_DESCR="$if_snmp_descr"
MaxBytes[$target_name]: $if_speed
Title[$target_name]: $html_desc_prefix$html_if_title_desc -- $sysname
PageTop[$target_name]: <h1>$html_desc_prefix$html_if_title_desc -- 
    <tr><td>ifType:</td>     <td>$html_if_type_desc ($if_type_num)</td></tr>
    <tr><td>ifName:</td>     <td>$html_if_snmp_name</td></tr>
$target_lines .= <<ECHO if defined $if_port_name;
    <tr><td>Port Name:</td>  <td>$if_port_name</td></tr>

$target_lines .= <<ECHO;
    <tr><td>Max Speed:</td>  <td>$if_speed_str</td></tr>

$target_lines .= <<ECHO if $if_ip;
    <tr><td>Ip:</td>         <td>$if_ip ($if_dns_name)</td></tr>

$target_lines .= <<ECHO;
AddHead[$target_name]:<link rel="stylesheet" type="text/css" 
href="../css/14all.css" />
PageFoot[$target_name]:<div>MRTG &copy;<a 
href="http://ee-staff.ethz.ch/~oetiker/">Tobias Oetiker</a></div>
(Some lines are wrapped after pasting to mail program).
For more info about creating template look at the MRTG cfgmaker documentation.
In my example I use external css file for changing design of generated page.

Best regards,

Pavel Ruzicka

> when I put up 2.12.2 the cfgmaker output within the <table> section is
> full of white space while it was compact with previous releases.
> am i doing something incorrect or is this just the way it now is (liked
> the compact version much better)?
> EX.
>                  *---------------------now is---------------------
> <table>
> 				<tr>
> 					<td>System:</td>
> 					<td>Pal-Mac in </td>
> 				</tr>
> 				<tr>
> 					<td>Maintainer:</td>
> 					<td></td>
> 				</tr>
>                               --------------was like this-----------
>    <TR><TD>System:</TD>     <TD>Oakfield-Alabama in </TD></TR>
>    <TR><TD>Maintainer:</TD> <TD></TD></TR>
> Thanks in advance for any info.
> Bob

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

More information about the mrtg mailing list