[mrtg] Re: best practice

JACOB STEENHAGEN jsteenhagen at acutex.net
Tue Jan 29 22:57:29 MET 2002


> 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



More information about the mrtg mailing list