mrtg 3 ... a mockup cfg file
Tobias Oetiker <[email protected]> Sun, 30 Apr 2000 22:59:58 +0200 (MET DST)
| Newsgroups | gmane.network.mrtg.devel |
|---|---|
| Message-ID | <[email protected]> |
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 <[email protected]> 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 <[email protected]>', -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 /_/ \.__/_.__/_/ [email protected] http://ee-staff.ethz.ch/~oetiker -- Unsubscribe mailto:[email protected]?subject=unsubscribe Help mailto:[email protected]?subject=help Archive http://www.ee.ethz.ch/~slist/mrtg-developers