[c-nsp] MRTG Template for packets, Discards and errors
Aldo Valente
aldo.valente at gmx.de
Thu Feb 24 07:36:35 EST 2005
/me wrote
> It is a Template for cfgmaker which will give packet counts, discards and
> errors. "cfgmaker --if-template THIS-FILE"
Seems that this list has a filter for Attachments. So, be careful with line
wraps. Sorry.
Aldo
PS: Thanks, Elmi
>>>>>>>>>
## --if-template $B/if-errors-template
$target_lines .= $default_target_lines;
$target_lines =~ s|Directory\[${target_name}\]:
$directory_name|Directory\[${target_name}\]:
$directory_name/${target_name}|;
$target_lines .= <<ECHO;
ThreshMaxI[${target_name}]: 90%
ThreshMaxO[${target_name}]: 90%
ThreshDesc[${target_name}]: switchport
ThreshProgI[${target_name}]: /root/mrtg/bin/bandwidth-in-error
ThreshProgOKI[${target_name}]: /root/mrtg/bin/bandwidth-in-ok
ThreshProgO[${target_name}]: /root/mrtg/bin/bandwidth-out-error
ThreshProgOKO[${target_name}]: /root/mrtg/bin/bandwidth-out-ok
###############
if-errors
Target[${target_name}-if-errors]:1.3.6.1.2.1.2.2.1.14.$ifindex&1.3.6.1.2.1.2.2.1.20.$ifindex:$router_connect
SetEnv[${target_name}-if-errors]: MRTG_INT_IP="$if_ip"
MRTG_INT_DESCR="$if_snmp_descr"
ECHO
if ($directory_name) {
$target_lines .= "Directory[${target_name}-if-errors]:
$directory_name/${target_name}\n";
}
$target_lines .= <<ECHO;
Legendi[${target_name}-if-errors]: IF Errors In
Legendo[${target_name}-if-errors]: IF Errors Out
MaxBytes[${target_name}-if-errors]: 4294967296
Options[${target_name}-if-errors]: nopercent,growright,gauge,withzeroes
Title[${target_name}-if-errors]: Interface Errors for $html_if_title_desc --
$sysname
YLegend[${target_name}-if-errors]: if errors
PageTop[${target_name}-if-errors]: <H1> Interface Errors for
$html_desc_prefix$html_if_title_desc -- $sysname</H1>
<TABLE>
<TR><TD>System:</TD> <TD>$sysname in $html_syslocation</TD></TR>
<TR><TD>Maintainer:</TD> <TD>$html_syscontact</TD></TR>
<TR><TD>Description:</TD><TD>$html_if_description</TD></TR>
<TR><TD>ifType:</TD> <TD>$html_if_type_desc
($if_type_num)</TD></TR>
<TR><TD>ifName:</TD> <TD>$html_if_snmp_name</TD></TR>
ECHO
$target_lines .= <<ECHO if defined $html_if_snmp_descr;
<TR><TD>Port Name:</TD> <TD>$html_if_snmp_descr</TD></TR>
ECHO
$target_lines .= <<ECHO;
<TR><TD>Max Speed:</TD> <TD>$if_speed_str</TD></TR>
ECHO
$target_lines .= <<ECHO if $if_ip;
<TR><TD>Ip:</TD> <TD>$if_ip ($if_dns_name)</TD></TR>
ECHO
$target_lines .= <<ECHO;
</TABLE>
ECHO
$target_lines .= <<ECHO;
################## UCast Packets
Target[${target_name}-if-packets]:
.3.6.1.2.1.2.2.1.11.$ifindex&1.3.6.1.2.1.2.2.1.17.$ifindex:$router_connect
SetEnv[${target_name}-if-packets]: MRTG_INT_IP="$if_ip"
MRTG_INT_DESCR="$if_snmp_descr"
ECHO
if ($directory_name) {
$target_lines .= "Directory[${target_name}-if-packets]:
$directory_name/${target_name}\n";
}
$target_lines .= <<ECHO;
MaxBytes[${target_name}-if-packets]: 4294967296
YLegend[${target_name}-if-packets]: Packets
Options[${target_name}-if-packets]: nopercent,growright,withzeroes
Title[${target_name}-if-packets]: UCast Packets for $html_if_title_desc --
$sysname
PageTop[${target_name}-if-packets]: <H1> Packets for
$html_desc_prefix$html_if_title_desc -- $sysname</H1>
<TABLE>
<TR><TD>System:</TD> <TD>$sysname in $html_syslocation</TD></TR>
<TR><TD>Maintainer:</TD> <TD>$html_syscontact</TD></TR>
<TR><TD>Description:</TD><TD>$html_if_description</TD></TR>
<TR><TD>ifType:</TD> <TD>$html_if_type_desc
($if_type_num)</TD></TR>
<TR><TD>ifName:</TD> <TD>$html_if_snmp_name</TD></TR>
ECHO
$target_lines .= <<ECHO if defined $html_if_snmp_descr;
<TR><TD>Port Name:</TD> <TD>$html_if_snmp_descr</TD></TR>
ECHO
$target_lines .= <<ECHO;
<TR><TD>Max Speed:</TD> <TD>$if_speed_str</TD></TR>
ECHO
$target_lines .= <<ECHO if $if_ip;
<TR><TD>Ip:</TD> <TD>$if_ip ($if_dns_name)</TD></TR>
ECHO
$target_lines .= <<ECHO;
</TABLE>
ECHO
$target_lines .= <<ECHO;
################## Discards
Target[${target_name}-if-discards]:
1.3.6.1.2.1.2.2.1.13.$ifindex&1.3.6.1.2.1.2.2.1.19.$ifindex:$router_connect
SetEnv[${target_name}-if-discards]: MRTG_INT_IP="$if_ip"
MRTG_INT_DESCR="$if_snmp_descr"
ECHO
if ($directory_name) {
$target_lines .= "Directory[${target_name}-if-discards]:
$directory_name/${target_name}\n";
}
$target_lines .= <<ECHO;
MaxBytes[${target_name}-if-discards]: 4294967296
YLegend[${target_name}-if-discards]: if discards
Options[${target_name}-if-discards]: nopercent,growright,gauge,withzeroes
Title[${target_name}-if-discards]: Discards for $html_if_title_desc --
$sysname
PageTop[${target_name}-if-discards]: <H1> Discards for
$html_desc_prefix$html_if_title_desc -- $sysname</H1>
<TABLE>
<TR><TD>System:</TD> <TD>$sysname in $html_syslocation</TD></TR>
<TR><TD>Maintainer:</TD> <TD>$html_syscontact</TD></TR>
<TR><TD>Description:</TD><TD>$html_if_description</TD></TR>
<TR><TD>ifType:</TD> <TD>$html_if_type_desc
($if_type_num)</TD></TR>
<TR><TD>ifName:</TD> <TD>$html_if_snmp_name</TD></TR>
ECHO
$target_lines .= <<ECHO if defined $html_if_snmp_descr;
<TR><TD>Port Name:</TD> <TD>$html_if_snmp_descr</TD></TR>
ECHO
$target_lines .= <<ECHO;
<TR><TD>Max Speed:</TD> <TD>$if_speed_str</TD></TR>
ECHO
$target_lines .= <<ECHO if $if_ip;
<TR><TD>Ip:</TD> <TD>$if_ip ($if_dns_name)</TD></TR>
ECHO
$target_lines .= <<ECHO;
</TABLE>
ECHO
--
Lassen Sie Ihren Gedanken freien Lauf... z.B. per FreeSMS
GMX bietet bis zu 100 FreeSMS/Monat: http://www.gmx.net/de/go/mail
More information about the cisco-nsp
mailing list