[mrtg] Re: best practice

Dave Sanders Dave_Sanders at sento.com
Wed Jan 30 02:48:19 MET 2002


thanks !!!!!!!!!!!!!

-----Original Message-----
From: Chirhart, Brian [mailto:bchirhart at fnni.com]
Sent: Tuesday, January 29, 2002 5:35 PM
To: Dave Sanders; Chirhart, Brian; JACOB STEENHAGEN; Sharath Udupa;
mrtg at list.ee.ethz.ch
Subject: RE: [mrtg] Re: best practice


Make sure your configs have:

WorkDir: Where/you/want/your/files
In the global options and

Directory[192.255.200.1_Serial1_0]: DirectoryName
For each target.

I usually name the WorkDir whatever group or building I am monitoring
and
the per target directory as the device hostname or some type of
description.

Now you have a complete path of
Where/you/want/your/files/DirectoryName/*.png
There are other ways to do it, but I find this to be the easiest for me.


 -----Original Message-----
From: 	Dave Sanders [mailto:Dave_Sanders at sento.com] 
Sent:	Tuesday, January 29, 2002 6:31 PM
To:	Chirhart, Brian; JACOB STEENHAGEN; Sharath Udupa;
mrtg at list.ee.ethz.ch
Subject:	[mrtg] Re: best practice


I have seen a problem with my config. I have the all my routers (8)
using the same .bat file with separate .cfg's. When I run this all of
the images, logs and html docs for these 3 routers get put into the same
nada2 dir under inetpub/mrtg/nada2. I have similar lines for the other 5
routers configured but they don't give me images, logs or html files at
all. Is there something that I need to do to cfg's so they will produce
images and put them in the correct place ? I don't have any spaces
between lines is my .bat I did that to make it easier to look at. 

perl c:\mrtg\bin\cfgmaker --ifref=descr --global "htmldir:
c:\inetpub\mrtg\nada" --global "imagedir: c:\inetpub\mrtg\nada\images"
--global "logdir: c:\inetpub\mrtg\nada\logs" --global "options[_]:
growright,bits" hello at nada.sento.com:::::2 --output
c:\mrtg\config\nada.cfg

perl c:\mrtg\bin\cfgmaker --ifref=descr --global "htmldir:
c:\inetpub\mrtg\nada2" --global "imagedir: c:\inetpub\mrtg\nada2\images"
--global "logdir: c:\inetpub\mrtg\nada2\logs" --global "options[_]:
growright,bits" hello at nada2.sento.com:::::2 --output
c:\mrtg\config\nada2.cfg

perl c:\mrtg\bin\cfgmaker --ifref=descr --global "htmldir:
c:\inetpub\mrtg\sento732" --global "imagedir:
c:\inetpub\mrtg\sento732\images" --global "logdir:
c:\inetpub\mrtg\sento732\logs" --global "options[_]: growright,bits"
hello at sento732.sento.com:::::2 --output c:\mrtg\config\sento732.cfg

Dave

-----Original Message-----
From: Chirhart, Brian [mailto:bchirhart at fnni.com]
Sent: Tuesday, January 29, 2002 4:55 PM
To: 'JACOB STEENHAGEN'; Dave Sanders; Sharath Udupa;
mrtg at list.ee.ethz.ch
Subject: RE: [mrtg] Re: best practice


Being the control freak that I am, I find that separate CFG files for
each
device works best for me.  I then throw those in to separate .BAT files
according to location.  This allows me the freedom to move separate
CFG's
around and place them in different directories.  Also - We use
Routers.CGI
(plug for Steve Shipway's awesome frontend) which plays real nice with
separate configs.

I call the .BAT files using Mr. Daemon (plug for David Sawyer's awesome
scheduler) running as a service.  I have 345 configs running on a 1 Ghz
box
w/ 512 MB ram and 1 IDE (sucks!) drive.  The only thing I would change
at
this point is to use a SCSI interface, but with less than 1000 configs,
I
don't think I really need it.



 -----Original Message-----
From: 	JACOB STEENHAGEN [mailto:jsteenhagen at acutex.net] 
Sent:	Tuesday, January 29, 2002 3:57 PM
To:	'Dave Sanders'; Sharath Udupa; mrtg at list.ee.ethz.ch
Subject:	[mrtg] Re: best practice

> From: Sharath Udupa [mailto:sku79 at yahoo.com]

> can anybody tell me the best way to run mrtg. ie, is it advised to run
>mrtg daemon for each device (ie have a different cfg file for each
> device) or is it better to group them together and execute.

What I've done (being a new user of the script and all) is Have one main
.cfg file that basically looks like:

---- BEGIN PASTE ----
Forks: 4
WorkDir: /home/httpd/mrtg
Options[_]: bits,growright

#################################################
#             Internal Routers                  #
#################################################

Include: /home/mrtg/cfg/acutex-router.inc
Include: /home/mrtg/cfg/corp-router.inc
Include: /home/mrtg/cfg/hilite-router.inc
Include: /home/mrtg/cfg/nsi-plant1-router.inc

#################################################
#             Internet Routers                  #
#################################################

Include: /home/mrtg/cfg/acutex-internet-router.inc

#################################################
#                    Servers                    #
#################################################

Include: /home/mrtg/cfg/acutex-exchange3.inc
Include: /home/mrtg/cfg/acutex-netware.inc

#################################################
#                   Printers                    #
#################################################

Include: /home/mrtg/cfg/acutex-printer-aacct1.inc

---- END PASTE ----
(some comments and white space was removed :)

This allows me to have files that are of a manageable size but still
only
have one cron job to collect all my data.

To make things even more interesting, I have all the .cfg and .inc file
in a
CVS repository and a cron job to update them from CVS (cd <mrtg_cfg>;cvs
-q
update -dP) about once an hour.  Then anybody who has access to commit
files
to my CVS repository (the admins at other divisions within the corp. I
work
for) can add/remove/change options and have them appear live within an
hour.

I don't know if this would be considered "best practice", but it's
what's
been working for me...


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



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