[mrtg] Re: cfgmaker IfInError Patches
Martin Rheumer
martinr at hotkey.net.au
Thu Jul 11 13:14:37 MEST 2002
Not unlike me to answer my own question.
Due to the brilliant programming of Tobias and some really
bad perl hacking this is the answer to have a cfgmaker
based on 2.9.21 that can be used to make .cfg files that
graph ifInErrors and ifOutErrors.
Approx Line # 463
This line read
my $target_name = "${router_name}_$trim_if_ref";
I changed it to
my $target_name = "${router_name}_$trim_if_ref\_err";
This allows the errors to be
Target[ip_address_ifindex(ref)_err]: blah blah
Approx Line # 533
my $default_target_directive =
"Target[$target_name]: $if_ref:$router_connect";
Was changed to
my $default_target_directive =
"Target[$target_name]:
ifInErrors.$if_ref\&ifOutErrors.$if_ref:$router_connect";
Now I had some problems with ATM sub interfaces that dont have .ifInErrors
values so changed some commented out lines from the code.
These were at line # 375
# elsif ($$router_dev{Vendor} eq 'cisco' and $$i{ifType} == 53) {
# push @prob, "agregate cisco interface interface does not
count traffic";
# $default_iftype = 0;
# }
And made them comment out the interface type of 49 like this.
elsif ($$router_dev{Vendor} eq 'cisco' and $$i{ifType} == 49)
{
push @prob, "cisco interface does not have IfInEerrors
etc";
$default_iftype = 0;
}
I pray I havent hacked major errors into cfgmaker.
PLEASE copy the existing cfgmaker 2.9.21 and call this something like
cfgmaker.errors
like I did. It will not work normally after my changes.
When you call it.. You will need something like this..
./cfgmaker.error --global "WorkDir: /usr/local/mrtg/htdocs/router_name"
--global "Options[_]: Growright, Perminute, Integer, NoPercent" --global
"YLegend[_]: Errors/min" --global "ShortLegend[_]: Errors/min" --global
"IconDir: /gifs" public at ip_address
This is how I call it and it works a treat.
Any comments greatfully received.
I got a few comments about when you figure it out let me know so
I hope I am letting you know ;-))
Martin
At 11:29 AM 11/07/02 +1000, Martin Rheumer wrote:
>
>Did some searching today and found a patch to
>cfgmaker to add IfInErrors to a cfgmaker script.
>Unfortunately its for an earlier version of cfgmaker.
>
>Has anyone patched / could lead me to the answer
>for cfgmaker 2.9.21 ..
>
>Thanks
>Martin
>
>--
>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
>
>
--
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