[mrtg] Incoming errors only? gvolk's interface-errors.template
Steve Shipway
s.shipway at auckland.ac.nz
Wed Nov 10 17:54:33 CET 2010
MRTG will always log two metrics per Target, so you dont really have anything to gain by this.
However you could add 'noo' to the Options[] line which will suppress display of the outgoing stats.
Steve
Steve Shipway
University of Auckland ITS
UNIX Systems Design Lead
s.shipway at auckland.ac.nz<mailto:s.shipway at auckland.ac.nz>
Ph: +64 9 373 7599 ext 86487
________________________________
From: mrtg-bounces+s.shipway=auckland.ac.nz at lists.oetiker.ch [mrtg-bounces+s.shipway=auckland.ac.nz at lists.oetiker.ch] on behalf of Arvon Griffiths [Arvon.Griffiths at txdot.gov]
Sent: Thursday, 11 November 2010 4:03 a.m.
To: mrtg
Subject: [mrtg] Incoming errors only? gvolk's interface-errors.template
Now that the cfgs are being generated and since outgoing errors are always zero, is there a way to modify the template file to only log incoming errors?
Here's the template file:
###############################################################################
#
# interface-errors.template v20030106 by gvolk at gvolk.com<mailto:gvolk at gvolk.com>
#
# The following is a mrtg template that can be used in conjunction with
# cfgmaker for automatically building configs for monitoring interface
# errors.
#
# Usage: cfgmaker --if-template=interface-errors.template public at router<mailto:public at router>
#
#
# This template is available under the GNU GPL. For more information, please
# see http://www.gnu.org/copyleft/gpl.html.
#
#z
# Version History:
# 20020806 - Initial Release
# 20030106 - Added GPL Licensing Note
#
if ($if_ok) {
my $target_name = $target_name . ".err";
my $directory_name = $directory_name . "err";
$head_lines .= <<ECHO;
# Input/output errors for $target_name
#---------------------------------------------------------------------
ECHO
$target_lines .= <<ECHO;
Target[$target_name]: ifInErrors.$if_index&ifOutErrors.$if_index:$router_connect * 300
RouterUptime[$target_name]: $router_connect
Directory[$target_name]: $directory_name
YLegend[$target_name]: Error Packets
ShortLegend[$target_name]: /s
Legend1[$target_name]: Error Packets
ShortLegend[$target_name]: /s
Legend1[$target_name]: Error Packets
Legend2[$target_name]:
Legend3[$target_name]: Error Packets
Legend4[$target_name]:
LegendI[$target_name]: Inbound Error Packets:
LegendO[$target_name]: Outbound Error Packets:
MaxBytes[$target_name]: 1000
Options[$target_name]: growright, nopercent, unknaszero
Title[$target_name]: $router_name $if_ref Errors
PageTop[$target_name]: <H1>$router_name $if_ref</H1>
<TABLE>
<TR><TD>System:</TD><TD>$router_name in $html_syslocation</TD></TR>
<TR><TD>Maintainer:</TD><TD>$html_syscontact</TD></TR>
<TR><TD>Description:</TD><TD> In/Out Error counters </TD></TR>
<TR><TD>Resource:</TD><TD>$if_ref</TD></TR>
</TABLE>
ECHO
}
#print $target_lines;
===================
Texas Transportation Forum
www.texastransportationforum.com
===================
Texas Transportation Forum
www.texastransportationforum.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.oetiker.ch/pipermail/mrtg/attachments/20101110/ff0c5214/attachment.htm
More information about the mrtg
mailing list