[mrtg] HTML configuration

Leonardo Reginin leonardo at procergs.rs.gov.br
Wed May 25 18:23:11 CEST 2011

man cfgmaker

                           Replace the normal target entries for the 
                           with an entry as specified by the contents in 
the file
                           templatefile.  The file is supposed to 
contain Perl
                           code to be executed to generate the lines for the
                           target in the configuration file.
                           (Experimental, under development, might change)


        Details on Templates

        The contents of the template files are evaluated as a Perl 
program.  A
        number or Perl variables are available for the program to read 
and oth-
        ers are used to be written to.

        As quite a few of the predefined variables has values which are are
        supposed to be used in HTML code some of them have an "HTML-escaped"
        variant, e.g $html_syslocation is the HTML escaped variant of 
        tion.  The HTML escaping means that the chars "<", ">" and "&" are
        replaced by "&lt;", "&gt;" and "&amp;" and that newlines embedded in
        the string are prepended with "<BR>" and appended with a space 
        ter (if a newline is last in the string it is not touched).

# cat sample_template_file

$target_lines .= <<ECHO;
PageTop[$target_name]:  \\n
<TABLE>  \\n
<TR>  \\n
<TD colspan=2> <font size=+1><B> $if_description - $sysname </B> </font> 
</TD> \\n
<TD> </TD></TR> \\n
<TR>  \\n
<TD><font size=+1> Device: </font> </TD>  \\n
<TD><font size=+1> $sysname </font> </TD> </TR>   \\n
<TR>  \\n
<TD><font size=+1> Description:\&nbsp </font> </TD>  \\n
<TD><font size=+1> $if_description </font> </TD> </TR>  \\n
<TR>  \\n
<TD><font size=+1> Speed </font> </TD>  \\n
<TD><font size=+1> $if_speed_str </font> </TD> </TR>   \\n
</TABLE>   \\n

# cfgmaker --if-template=sample_template_file community at router

-------- Original Message --------
Subject: [mrtg] HTML configuration
From: Jordan C. Bailey <Jordan.Bailey at nationals.com>
To: mrtg at lists.oetiker.ch <mrtg at lists.oetiker.ch>
Date: Wed May 25 12:16:25 2011
> Hello!!
> I am having trouble trying to get my MRTG HTML page to display my 
> interfaces as the interface description, and not just the port number. 
> I have over 100 devices to monitor and it would be much much easier if 
> I could makes changes to how things are displayed. If anyone could 
> point me to an advanced configuration manual (how to) or just help 
> with specific questions that would be great!!
> Thanks
> Jordan
> **
> NatsTown 
> <http://washington.nationals.mlb.com/was/ticketing/flex_plans.jsp>
> 202.675.NATS(6287)
> ***
> *nationals.com <http://washington.nationals.mlb.com/index.jsp?c_id=was>*
> *
> ****ATTENTION****
> This e-mail contains privileged and confidential information intended 
> exclusively for the use of the addressee(s) named above. If you are 
> not the intended recipient of this e-mail, or the employee or agent 
> responsible for delivering it to the intended recipient, you are 
> hereby notified that any dissemination, copying or other use of this 
> e-mail and any attachments hereto is strictly prohibited. If you have 
> received this e-mail in error, please notify the sender immediately by 
> telephone and delete this e-mail and any attachments from your system. 
> Thank you.
> <#>
> _______________________________________________
> mrtg mailing list
> mrtg at lists.oetiker.ch
> https://lists.oetiker.ch/cgi-bin/listinfo/mrtg


Leonardo Reginin

PROCERGS - Cia.  Processamento   de  Dados  do  Estado   do  RS
DPR/SSR -  Divisão de Produção/Setor de Suporte e Projeto Redes
Fone:  55(xx51)3210-3138
'A candle loses nothing by lighting another candle' Erin Majors

O conteúdo desta mensagem é de uso restrito e confidencial, sendo o seu
sigilo protegido por lei. Estas informações não podem ser divulgadas sem
prévia autorização escrita. Se você não é o destinatário desta mensagem,
ou o responsável pela sua entrega, apague-a imediatamente e avise o
remetente, respondendo esta mensagem. A PROCERGS não se responsabiliza
por conclusões, opiniões ou outras informações nesta mensagem que não se
relacionem com sua linha de negócios.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.oetiker.ch/pipermail/mrtg/attachments/20110525/708e04c2/attachment-0001.htm 

More information about the mrtg mailing list