[mrtg] Re: rrd and mrtg
Ross Tsolakidis
rtsolakidis at powerserve.com.au
Tue Sep 17 04:59:40 MEST 2002
I do this...
I use routers.cgi and basically have a url per user..
Here is the readme:
Q. How do I give individual users personalised routers2.conf files?
A.1) You can almost achieve this using the 'extra' parameter, or by changing
the name of the script, or via a username that has already been
authenticated by your web server.
Using the 'extra' parameter:
First, set up a new section in the routers2.conf for the user or group
that
you have. For example, call it 'xxxx'. Now put extra directives into
this
section to override the directives in the routers.cgi section. eg:
[routers.cgi]
confpath = /mrtg/normal
cfgfiles = router-*.cfg
iconpath = /www/html/rrdicons
[xxxx]
confpath = /mrtg/special
cfgfiles = *.cfg
Now, when you call routers.cgi normally, you will use the [routers.cgi]
section, as usual. However, if you use the parameter 'extra=xxxx', then
the [xxxx] section will override confpath and cfgfiles (although iconpath
will remain unchanged). Eg:
http://myserver/cgi-bin/routers.cgi?extra=xxxx
2)Using the script name:
You can achieve the same result by renaming the script - for example, if
the new section was called 'test.cgi', then you could copy the
routers.cgi
script to 'test.cgi', and when run it would use the [test.cgi] section as
an override to the [routers.cgi] section.
3)Using the username:
First, you must configure your web server to authenticate the user. This
will set the username in the CGI parameters. Then, create a new section
in the routers2.conf file called [user-USERNAME] (for the appropriate
USERNAME, of course). For example, if the user is 'steve', then create
[user-steve] and put any per-user settings in here.
You can make as many override sections as you like, although they will
only
override the [routers.cgi] section, and you can only use one of each type
at
once. Also, they must not have the same name as any other existing
sections, else they won't work correctly. Note that, if you are really
crazy, you can use all three of these methods simultaneously. I wouldn't
advise it, though.
--
As you can see there a several ways to do it..
I use the first method, then use apache to make url look better ;) .. eg:
################## Customer1 ##############################
<VirtualHost xxx.xxx.xxx.xxx:80>
ServerAdmin --------------------
DocumentRoot /var/www/
ScriptAlias /cgi-bin/ "/usr/lib/cgi-bin/"
DirectoryIndex /cgi-bin/customer1.cgi
ServerName stats.customer1.com
ErrorLog /var/log/apache/customer1-error.log
CustomLog /var/log/apache/custom.log common
</VirtualHost>
Hope this helps..
The creator of the software Steve Shipway also runs a list, check out his
site for details..
http://www.cheshire.demon.co.uk/pub/
Cheers,
--
Ross.
-----Original Message-----
From: Taymour A. El Erian [mailto:taymour.elerian at tedata.net]
Sent: Tuesday, 17 September 2002 1:26 AM
Cc: mrtg at list.ee.ethz.ch
Subject: [mrtg] Re: rrd and mrtg
Do you mean routers.cgi, because there is no routers2.cgi on this link.
I have tried that but how do you configure it to do what I specified (it
will display all the graphs for all interfaces in the config file)
Garry Cook wrote:
>The routers2.cgi front-end will allow you to do this, among other things.
>http://www.cheshire.demon.co.uk/pub/
>
>Garry W. Cook, CCNA
>Network Infrastructure Manager
>MACTEC, Inc. - http://www.mactec.com/
>303.308.6228 (Office) - 303.881.5157 (Mobile)
>
>
>
>>Hi,
>> We are an ISP and we were using MRTG to provide graphs for our
>>leased line customers, what we did is create a separate directory on our
>>web server for each customer and create symbolic links to his files
>>(html, png) and we require a username and password from him to view the
>>contents.
>>
>>
>
>--
>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
>
>
>
>
>
--
Taymour A El Erian
System Division Manager
T.E. Data
E-mail: taymour.elerian at tedata.net
Web: www.tedata.net
Tel: +(202)-7494025
Ext: 1101
--
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
--
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