[mrtg] Re: One config & per customer access

Michael Markstaller mm at elabnet.de
Fri Apr 4 12:04:30 MEST 2003


regarding 14all.cgi, I have latest version 1.1p25 running and also mod_perl (I at least installed, I hope it's also used..); 
I did another test, clicking a directory from the overview with 34 graphs takes 68 secs loading both CPU's to 95%. This is now with one config-file with include: all the other per-host cfg's, the same directory with mrtg-rrd.cgi 0.6 still takes 45 seconds, I also tried to use the installed fastcgi with mrtg-rrd.cgi with this doesn't seem to makes a difference. Maybe there some hint for me on what to look to speed this up, a few lines from /server-info in case somebody sees something obvious below.. Both, 14all.cgi and mrtg-rrdi.cgi wasn't changed in any way.

Also another question to the apache guru's, although I know this gets off-topic: is there a way to set some string-variable in apache .conf or .htaccess depending on basic-authenticated username/group which I can then use in i.e. mrtg-rrd.cgi (containing the string with customer-specific mrtg-xxx.cfg for each user)? this would help me much to simplify configuration..

--- cut /server-info ---
Server Version: Apache/1.3.27 (Unix) (Red-Hat/Linux) mod_ssl/2.8.12 OpenSSL/0.9.6 PHP/4.1.2 mod_perl/1.24_01 mod_fastcgi/2.2.12 mod_throttle/3.1.2
Server Built: Oct 23 2002 14:51:49
API Version: 19990320:13
Run Mode: standalone
User/Group: apache(48)/48
Hostname/port: xxx.xxx.com:80
Daemons: start: 8    min idle: 5    max idle: 20    max: 150
Max Requests: per child: 1000    keep alive: on    max per connection: 100
Threads: per child: 0    
Excess requests: per child: 0    
Timeouts: connection: 300    keep-alive: 15
--- cut ---

P.S. I did a host-template for (mainly) Cisco-routers and W2k-servers including CPU/Mem/Buffers/IPSec-global & IP/TCP/UDP generic and an Cisco interface-template with packet-counters, ifErrors and IOS-Switching stats (process vs. fast-switched) for each interface. these templates also check wether the variable being polled is actually existing on host/interface which makes config built autotically correctly.. just in case somebody is interested (after still reading this ;)


-----Original Message-----
From: Jerry Heidtke [mailto:jheidtke at fmlh.edu]
Sent: Thursday, April 03, 2003 10:54 PM
To: Michael Markstaller; mrtg at list.ee.ethz.ch
Subject: RE: [mrtg] One config & per customer access

If it is taking 14all 25 secs to create 8 graphs (3 secs/graph), there
is something wrong with how 14all is configured. On my server, a
single-CPU Compaq 1.3 GHz, Win2K, Apache 1.3, it takes 14all about 2
seconds to create 20 graphs (0.1 secs/graph, or 30X faster than yours),
even with Apache having to do NTLM authentication for every page

Are you running 14all under mod_perl? Do you have the most recent
version? http://my14all.sf.net

The issue might be the size of your config file. I've got ~200
individual device configs called by 14all from a hand-crafted web page
(collapsing menus, etc.). For mrtg's data collection, these are spread
across 12 or so cfg's with include statements. I can stop and start data
collection on any individual device, without affecting 14all's ability
to keep displaying historical information about that device.

Try to think of the data collection and data presentation problems as
two separate issues, which might require two separate sets of config
files to solve. If you can reduce then duplication through links or
includes, all the better.

14all is pretty flexible when it comes to controlling how the graphs
look, if you don't like the defaults. You can even make them look very
much like the mrtg/rateup defaults.

This doesn't help your authentication/authorization problem, though.
Some Apache guru will have to chime in, but you could probably do
something relatively simple with virtual directories and mod_rewrite.

Unfortunately, I haven't had much success with mrtg-rrd or routers2. I'm
sure I could get them to work, but haven't had the time to dig into it
in depth. Actually my long-term goal is to move all of this to


-----Original Message-----
From: Michael Markstaller [mailto:mm at elabnet.de] 
Sent: Thursday, April 03, 2003 1:23 PM
To: mrtg at list.ee.ethz.ch
Subject: [mrtg] One config & per customer access


I know this was disussed several times but I found no real solution for
me from reading the archives, sorry. The explanation is getting quite
long, I'll try to make it as clear as possible..
Currently I have 
- ONE big mrtg config-file with approx. 80 individual hosts and about
900 targets 
- using mrtg 2.9.25 with rrdtool
- RH-Linux 7.1 on a Dual PIII 866, 256 MB
- mostly using mrtg-rrd.cgi (0.5/0.6) for displaying graphs
- Apache 1.3.27 with basic-authentication
- each host has it's own "Directory" (by hostname) and most graphs are
in subdirectorys underneath the hosts, which makes viewing/browse quick
and clear; 
I'm quite happy this is all working fine so far ;)

Now, I want wo give some customers access view "their" hosts' graphs,
customers can be seperated easily by hostnames/diectorys
(customer1=host2,host3,host6; customer2=host1,host7 etc.) and here I'm,
stuck; I wonder what you guys are doing ?
- 14all.cgi: is no option, I don't like the graphs it creates, it's very
slow and eats up my CPU's (is it normal 14all.cgi takes 25 secs for 8
graphs on this box killing up almost both cpu's ??)

- routers2.cgi: I haven't managed to configure it to display all my
hosts as devices correctly without splitting up the config-file to one
config-file for each host. I've set "routerdefault = hostname" and
played around with most config-options, but still get only the first
device from each cfg under devices and then all graphs together in a
list (you could imagine how this looks like with 900 targets)..
Is there any way to make it work without splitting-up the config to
"one-each-host" ?
Otherwise I think it would work because of the Username- option in
config is quite what I look for.
If I split the config up, how would you suggest to arrange it (subdirs?)
to make access-control as easy as possible for apache/routers2.cgi ?

- Finally mrtg-rrd.cgi: I like the graphs and everything else, the only
"bug" is it doesn't display subdirectory underneath a host directory but
this could be (hopefully) fixed with my little perl know-how if
nescessary ;). But I have see no chance to seperate display by customer
(the only option I see is to create one mrtg-rrd_customer.cgi with
sepearte cfg-file for each customer which makes things quite complicated
for operation/changes)

All in all, is there a suggestion for a combination of MRTG-RRD
displaying graphs quickly on Apache with Basic-auth (not many concurrent
users viewing them) while handling with an as least complex config as
possible when changing something ? (currently I see I'd have to change
10 config/cgi-files in 5 directorys for one customer and restart 3
deamons ;)

Are there any good frontends with quite "original-mrtg-like" output
requiring few to no own configuration (besides mrtg.cfg) that I've
missed ? I also looked at cati but this seems even more complex..

Thanks for any comments.

Michael Markstaller

Elaborated Networks GmbH 
Lise-Meitner-Str. 1, D-85662 Hohenbrunn, Germany 
fon: +49-8102-8951-60, fax: +49-8102-8951-80 

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

Confidentiality Notice: This e-mail message, including any attachments,
is for the sole use of the intended recipient(s) and may contain
confidential and privileged information.  Any unauthorized review, use,
disclosure or distribution is prohibited.  If you are not the intended
recipient, please contact the sender by reply e-mail and destroy all
copies of the original message.

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