[mrtg] Re: subdirs

Justin Shore listuser at vinnie.ksu.ksu.edu
Wed Sep 27 01:45:07 MEST 2000


At 2:28 PM -0400 9/26/00, Domain Reg. @meganet.net wrote:
>I understand that you can make router subdirectories, but how can I make
>interface subdirectories. I want to do this so I can password protect each
>directory and give my customers the option of checking what they are using
>for BW.

I think what you're needing is a better understanding of the 
"WorkDir" and "Directory" directives.  Here's an example:

WorkDir:  /home/httpd/html/network/stats

Target[client13]:  port#:community at switch
MaxBytes[client13]:	whatever
   ...
Directory[client13]:  client13


Now the target for all of the targets in this config file have the 
value of WorkDir as their top-level directory.  This is defined 
globally.  You have a target for client13's port.  Within the scope 
of that target you defined Directory to be a sub directory of 
WorkDir.  Now all of his stuff will end up in 
/home/httpd/html/network/stats/client13.  Nothing but his stuff with 
be in that directory unless you tell it to.  Make sense?  I did a 
contract job creating a stats website with MRTG, Webalizer, and some 
custom stuff.  For each of their static DSL customers I created a 
subdirectory just for them.  In that directory I dropped in a 
preconfigured .htaccess file and a userlist with a user and password 
for them (varies depending on your web server obivously).  Each 
static DSL customer had their own unique userid and passwd and only 
they (and me :-) ) could see their transfer stats.  Since each of 
them had a domain associated with their static line, I used their 
domain as their subdirectory name.  If you client don't want to 
advertise that you're their provider, you could either use client# or 
if you have a userid for a contact on their end, use that.

/home/httpd/html/network/stats/client69
/home/httpd/html/network/stats/jshore
or use /home/httpd/html/network/stats/clients, passwd protect that 
directory and distribute that passwd, and then create subdirs under 
that.  That way only current clients can see other clients.  You get 
the point.  Pick you're own naming scheme and stick with it.

HTH
   Justin

PS==> Read throught this:

http://ee-staff.ethz.ch/~oetiker/webtools/mrtg/reference.html
-- 

--
Justin Shore       K-State Linux Distro Mirror, Sysadmin
macdaddy at vinnie.ksu.ksu.edu
<http://vinnie.ksu.ksu.edu/mirror/rpm2html>
<ftp://vinnie.ksu.ksu.edu/pub/mirror/linux>

*Internet2 Users*
<ftp://quest.ksu.ksu.edu/pub/mirror/linux>

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