[mrtg] subdir dependent on interface type - cfgmaker
McDonald, Dan
Dan.McDonald at austinenergy.com
Tue Nov 25 14:27:12 CET 2008
On Tue, 2008-11-25 at 12:03 +0100, Jakub M wrote:
> Hello again :)
>
> I make a confg for a big, old CatOS switch. I want to have separated
> VLANs and normal Ethernet interfaces (in different folders). Normally,
> I would run cfgmaker two times and set other filters and subdirs, but
> for this switch for cfgmaker it takes about 2 hours (!) to go once.
> Therefore, I am curious if it is possible to make subdir dependent on
> interface type somehow?
You would have to write an interface template, and then make a
conditional portion based on $if_type.
something like:
print "$default_target_directive\n";
print "$default_setenv_directive\n";
if ($if_type == 53 ) {
print "Directory[$target_name]: $directory_name.vlans\n";
} else {
print "Directory[$target_name]: $directory_name.ethernet\n";
}
print "$default_maxbytes_directive\n";
print "$default_title_directive\n";
print "$default_pagetop_directive\n";
--
Daniel J McDonald, CCIE #2495, CISSP #78281, CNX
Austin Energy
http://www.austinenergy.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part
Url : http://lists.oetiker.ch/pipermail/mrtg/attachments/20081125/923b7229/attachment.bin
More information about the mrtg
mailing list