[mrtg] Re: Newbie Question

Patrick Bartkus patrckb at hotmail.com
Mon Apr 2 17:16:30 MEST 2001


Here is an example:

My crontab:
---
7,12,17,22,27,32,37,42,47,52,57 * * * * /usr/local/mrtguser/bin/switches.ksh
---

Then switches.ksh shows:
---
#!/usr/bin/ksh
#
#       s w i t c h e s . k s h
#
#       This script will execute the
#       mrtg querys for MKE and PVD Switches
#
/usr/local/mrtg-2/bin/mrtg /files0/httpd/htdocs/mrtg/mke/switches.cfg
/usr/local/mrtg-2/bin/mrtg /files0/httpd/htdocs/mrtg/pvd/switches.cfg
---

Then the location's cfg file brings together each switches's cfg:
---
cat /files0/httpd/htdocs/mrtg/mke/switches.cfg

# This includes all the Columbia cfg files
#
Include: /files0/httpd/htdocs/mrtg/mke/globals.inc
#
# Include the capps file
Include:/files0/httpd/htdocs/mrtg/mke/capps.cfg
#
# Include the donner file
Include:/files0/httpd/htdocs/mrtg/mke/donner.cfg
#
# Include the sangay file
Include:/files0/httpd/htdocs/mrtg/mke/sangay.cfg
#
# Include the firedrake file
Include:/files0/httpd/htdocs/mrtg/mke/firedrake.cfg
#
# Include the gillette file
Include:/files0/httpd/htdocs/mrtg/mke/gillette.cfg
#
# Include the hanna file
Include:/files0/httpd/htdocs/mrtg/mke/hanna.cfg
#
# Include the kellar file
Include:/files0/httpd/htdocs/mrtg/mke/kellar.cfg
#
---

Then the globals.inc file is:
---
cat /files0/httpd/htdocs/mrtg/mke/globals.inc
# Global Includes
WorkDir: /files0/httpd/htdocs/mrtg
Options[_]: bits,growright

IconDir: /mrtg/

LogFormat: rrdtool
PathAdd: /usr/local/rrdtool/bin/
LibAdd: /usr/local/rrdtool/lib/perl
Refresh: 300
---

Then each switch .cfg has the uplink ports I am interested in...

Enjoy!
Patrick
---
Patrick Bartkus, CCNP Certified	Sr. Network Support Analyst
Fleet Mortgage Group		    Columbia, SC
If truth was not absolute, how could there be justice?


>From: "Nabil Fares" <fares.nabil at epa.gov>
>To: "MRTG" <mrtg at list.ee.ethz.ch>
>Subject: [mrtg] Newbie Question
>Date: Mon, 2 Apr 2001 09:35:30 -0400
>
>
>Greetings all,
>
>Hope all had good weekend!
>
>I've about 60-80 config files for our routers, I'm trying to find a way to
>have one crontab instance instead of 80 different jobs. Someone previously
>mentioned something about the "include" statement, can you guys provide me
>with some examples?
>
>Thanks,
>
>Nabil
>
>


_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com


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