[mrtg-developers] mrtg 3 ... a mockup cfg file

Tobias Oetiker oetiker at ee.ethz.ch
Sun Apr 30 22:59:58 MEST 2000


Folks,

it is time to get going with mrtg 3 ... I think :-) ... As I have
been hinting off and on I am looking at doing something which is
much more modular and which can be enhanced more easily than the
current mrtg ... without being more difficult for the end user than
what you have today ...

one of the ideas is to write mrtg as a perl module. Instead of you
writing a cfg file for it you write a little (VERY simple) perl
program using MRTG.pm ...

to get things going I have started writing such an mrtg config file
...

what do you think ?


#!/usr/bin/perl

# mockup mrtg3 config file. Note config file is a perl program but
# with a very simple structure. The basic idea is build a tree of
# objects to monitor. Properties which are set on branches
# propagate to the leaves. Only leaves can gather actual data. Each
# leave represents an RRD file. 
#
# Using this tree structure it is then also quite simple to present
# the data in meaningful webpages ...
#
# Properties with an _ in their name are special properties for a
# subsystem the snmp_ things are for the snmp module the tmpl_
# things are for the template engine which builds the webpages the
# rrd_ items configure how the RRD files should be built.

# there is no code yet for MRTG.pm. ....

# tobi oetiker <oetiker at ee.ethz.ch>

use MRTG;

GLOBAL {
  -datastore => "/tmp/mrtg-data"
};


NODE ".", 
  {
   -snmp_mib => ['ifinoctets','ifoutoctets'],
   -snmp_community => "public",
   -action => "SnmpGet",
   -template => "basic.tmlp",
   -presentation => "static",
   -interval => 300,
   -rrd_rra => [ 'MIN:0.5:12:2400', 'MAX:0.5:12:2400',
		'AVERAGE:0.5:12:2400' ],
  };

NODE ".ezwf7", 
  {
   -tmpl_contact => 'Tobias Oetiker <oetiker at ee.ethz.ch>',
   -tmpl_location => 'ETZ B33.1',
   -snmp_address => "ezwf7.ethz.ch",  
   -snmp_port => 1233,
  };

NODE ".ezwf7.129_132_12_11", 
  {
   -tmpl_description => 'backup line for inet gw',
   -snmp_if_ip => '129.123.12.11',
  };

NODE ".ezwf7.129_132_13_11", 
  {
   -tmpl_description => 'private backbone dean',
   -snmp_if_ip => '129.123.13.11',
  };

NODE ".ezwf7.129_132_14_11", 
  {
   -tmpl_description => 'student network',
   -snmp_if_ip => '129.123.13.11',
  };


START;


-- 
 ______    __   _
/_  __/_  / /  (_) Oetiker, Timelord & SysMgr @ EE-Dept ETH-Zurich
 / // _ \/ _ \/ / TEL: +41(0)1-6325286  FAX:...1517  ICQ: 10419518 
/_/ \.__/_.__/_/ oetiker at ee.ethz.ch http://ee-staff.ethz.ch/~oetiker

--
Unsubscribe mailto:mrtg-developers-request at list.ee.ethz.ch?subject=unsubscribe
Help        mailto:mrtg-developers-request at list.ee.ethz.ch?subject=help
Archive     http://www.ee.ethz.ch/~slist/mrtg-developers



More information about the mrtg-developers mailing list