[mrtg] IPs and Ports of Switches

Haegi, Alain Alain.Haegi at ch.origin-it.com
Wed Apr 19 13:58:40 MEST 2000


I've done it now my script works and it really creates an index of the
ports. The page looks like this:
INDEX OF PORTS
1.1.1.1.1
this means IP.Port

now I would like to design it that it looks like this:
INDEX OF PORTS
1
this means Port

but I don't know how I can split the scalar "$router", so that just the Port
is there.



Here is the script that creates the HTML-Page. It's embedded into the
mrtg-script.
# create index.html
open(OUT,">$$cfg{'workdir'}${main::SL}index.html");
  print HTML '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">' . "\n";
  print OUT "<HTML>\n";
  print OUT "<HEAD>\n";  
  print OUT "<TITLE>INDEX OF PORTS</TITLE>\n";
  print OUT "</HEAD>\n";
  print OUT '<BODY BGCOLOR="#ffffff">' . "\n";
  print OUT "<H1 ALIGN=CENTER>Index of Ports</H1>\n";
  print OUT '&#160' . "\n";
  print OUT '<a href="' .
"$$cfg{'workdir'}${main::SL}$$rcfg{'directory'}{$router}$router" .
'.html">';
  print OUT "$router";
  print OUT '</a>';
  print OUT "</BODY>\n";
  print OUT "</HTML>\n";
  close OUT;

regards.

--
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



More information about the mrtg mailing list