[mrtg] Re: Modifying the mrtg

Stieers, Ken KStieers at dainrauscher.com
Thu Jan 27 14:15:21 MET 2000


Anthony, 

I don't know where people get such inflated ideas of my abilities, but
thanks for the compliment.  I did actually have to look at the code to
figure this out, so it wasn't a cake walk.  

The question is,  where in the top do you want to put it?

The block you need to move looks like this:

print HTML "
  <HR><BR>
  <TABLE WIDTH=500 BORDER=0 CELLPADDING=4 CELLSPACING=0>";
  print HTML "
   <TR><TD ALIGN=RIGHT><FONT SIZE=-1 COLOR=\"$$rcfg{'rgb1'}{$router}\">
      <B>$$rcfg{'col1'}{$router} ###</B></FONT></TD>
      <TD><FONT SIZE=-1>$leg1</FONT></TD></TR> " if $InCo;
  print HTML "
   <TR><TD ALIGN=RIGHT><FONT SIZE=-1 COLOR=\"$$rcfg{'rgb2'}{$router}\">
      <B>$$rcfg{'col2'}{$router} ###</B></FONT></TD>
      <TD><FONT SIZE=-1>$leg2</FONT></TD></TR> " if $OutCo;
  
  if ($$rcfg{'withpeak'}{$router}) {
    print HTML "
   <TR><TD ALIGN=RIGHT><FONT SIZE=-1 COLOR=\"$$rcfg{'rgb3'}{$router}\">
			<B>$$rcfg{'col3'}{$router}###</B></FONT></TD>
       <TD><FONT SIZE=-1>$leg3</FONT></TD></TR> " if $InCo;
  print HTML "
   <TR><TD ALIGN=RIGHT><FONT SIZE=-1 COLOR=\"$$rcfg{'rgb4'}{$router}\">
			<B>$$rcfg{'col4'}{$router}###</B></FONT></TD>
       <TD><FONT SIZE=-1>$leg4</FONT></TD></TR> "if $OutCo;
     }


Here's the section you'll insert it into.  I've added comments (#  location
1..., # location 2 ...)  etc. to show where you can insert this block. 

print HTML <<"TEXT";    
$$rcfg{'addhead'}{$router}
</HEAD>
<BODY $$rcfg{'backgc'}{$router}>
$$rcfg{'pagetop'}{$router}<BR>
#  location 1
<HR>
TEXT
#  location 2
print HTML     
&$LOC("The statistics were last updated <B>$Today
$$rcfg{'timezone'}{$router}</B>");


if ($uptime && ! $$rcfg{options}{noinfo}{$router}) {
print HTML
",<BR>
".&$LOC("at which time $namestring had been up for <B>$uptime</B>.")."
";
  }
# location 3
 my %sample= ('d' => "`Daily' Graph (".$interval.' Minute',
	       'w' => "`Weekly' Graph (30 Minute",
	       'm' => "`Monthly' Graph (2 Hour",
	       'y' => "`Yearly' Graph (1 Day");

Location 1 puts it above the the first horizontal rule on the pages. 
Location 2 puts it above the "The statistics were last updated....." line,
but after the horizontal rule
Location 3 put it after the ".... had been up for x days" line, before the
horizontal rule. 

> -----Original Message-----
> From: Miller Anthony (RBAU/ISY) [mailto:Anthony.Miller at au.bosch.com]
> Sent: Wednesday, January 26, 2000 7:04 PM
> To: 'Stieers, Ken'
> Subject: Modifying the mrtg
> Importance: High
> 
> 
> Hi Ken
> 
> Sorry to bother you but I know you will be able to answer 
> this on in your
> sleep. I tried to 
> modify the mrtg file so that I have the colour legend found 
> at the bottom of
> the graph, at the
> top instead. It didn't work, of course, so I was wondering if 
> you could tell
> me the
> script I need to cut out of the mrtg file, and where to paste it?
> 
> I am using NTserver 4sp4/2.8.3
> 
> thanks in advance
> 
> regards
> Anthony Miller
> ===============================
> Network Engineer
> Information Systems Department
> Robert Bosch (Australia) Pty. Ltd.
> 1555 Centre Road, Clayton, Victoria, Australia, 3168
> Tel. : +61 3 9541 7824          Fax : +61 3 9541 5284
> E-mail : anthony.miller at au.bosch.com
> 

--
Unsubscribe mailto:mrtg-request at list.ee.ethz.ch?subject=unsubscribe
Help        mailto:mrtg-request at list.ee.ethz.ch?subject=help
Archive     http://www.ee.ethz.ch/~slist/mrtg



More information about the mrtg mailing list