[mrtg] putting Options into each interface config from cfgmaker
lorddroon
lorddroon at hotmail.com
Wed Sep 4 23:51:40 MEST 2002
Does anyone know how I can get options to be automatically populated
into each individual interface config instead of being on top of the
config?
For example:
The cfgmaker command I'm using is this;
perl cfgmaker --ifref=descr --global "options[_]: growright,bits"
--global "WithPeak[_]: dwmy" read at router1 --global "WorkDir:
d:\mrtg_graph\rrd" --global "Interval: 5" --global "RunAsDaemon: yes"
--global "LogFormat: rrdtool" --global "Pathadd:
d:\rrdtool\src\tool_release" --global "LibAdd: d:\rrdtool\perl-shared"
--output d:\config\router1.cfg
The result cfg file will look like this;
### Global Defaults
# to get bits instead of bytes and graphs growing to the right
# Options[_]: growright, bits
options[_]: growright,bits
WithPeak[_]: dwmy
### Interface 1 >> Descr: 'FastEthernet0/0' | Name: 'Fa0/0' | Ip:
'172.16.240.1' | Eth: '00-10-7b-32-65-00' ###
Target[route1_FastEthernet0_0]: \FastEthernet0/0:read at route1:
SetEnv[route1_FastEthernet0_0]: MRTG_INT_IP="172.16.240.1"
MRTG_INT_DESCR="FastEthernet0/0"
MaxBytes[route1_FastEthernet0_0]: 12500000
Title[route1_FastEthernet0_0]: Traffic Analysis for FastEthernet0/0 --
PageTop[route1_FastEthernet0_0]: <H1>Traffic Analysis for
FastEthernet0/0 --</H1>
<TABLE>
<TR><TD>System:</TD> <TD></TD></TR>
<TR><TD>Maintainer:</TD> <TD></TD></TR>
<TR><TD>Description:</TD><TD>FastEthernet0/0 </TD></TR>
<TR><TD>ifType:</TD> <TD>ethernetCsmacd (6)</TD></TR>
<TR><TD>ifName:</TD> <TD>Fa0/0</TD></TR>
<TR><TD>Max Speed:</TD> <TD>100.0 Mbits/s</TD></TR>
<TR><TD>Ip:</TD> <TD>172.16.240.1 ()</TD></TR>
</TABLE>
I want it to be more like this after running cfgmake;
### Interface 1 >> Descr: 'FastEthernet0/0' | Name: 'Fa0/0' | Ip:
'172.16.240.1' | Eth: '00-10-7b-32-65-00' ###
Target[route1_FastEthernet0_0]: \FastEthernet0/0:read at route1:
SetEnv[route1_FastEthernet0_0]: MRTG_INT_IP="172.16.240.1"
MRTG_INT_DESCR="FastEthernet0/0"
MaxBytes[route1_FastEthernet0_0]: 12500000
options[route1_FastEthernet0_0]: growright,bits
WithPeak[route1_FastEthernet0_0]: dwmy
Title[route1_FastEthernet0_0]: Traffic Analysis for FastEthernet0/0 --
PageTop[route1_FastEthernet0_0]: <H1>Traffic Analysis for
FastEthernet0/0 --</H1>
<TABLE>
<TR><TD>System:</TD> <TD></TD></TR>
<TR><TD>Maintainer:</TD> <TD></TD></TR>
<TR><TD>Description:</TD><TD>FastEthernet0/0 </TD></TR>
<TR><TD>ifType:</TD> <TD>ethernetCsmacd (6)</TD></TR>
<TR><TD>ifName:</TD> <TD>Fa0/0</TD></TR>
<TR><TD>Max Speed:</TD> <TD>100.0 Mbits/s</TD></TR>
<TR><TD>Ip:</TD> <TD>172.16.240.1 ()</TD></TR>
</TABLE>
is this possible?
Lorddroon
--
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