[mrtg] Re: Extreme Black Diamond
Brander, Eric
Eric.Brander at ACS-INC.com
Tue Jan 28 22:06:55 MET 2003
When using cfgmaker and your template to build your cfg file, have you tried
the various --ifdesc= command line options? Check or try out --ifdesc=name
or --ifdesc=alias.
For more information, check
http://people.ee.ethz.ch/~oetiker/webtools/mrtg/cfgmaker.html and look for
the --ifdesc options.
HTH,
Eric Brander
ACS
Texas CHIP Account
Sr. Communications Engineer - Information Systems Department
512.336.3331
Eric dot Brander at acs-inc dot com
-----Original Message-----
From: Drew Weaver [mailto:drew.weaver at thenap.com]
Sent: Tuesday, January 28, 2003 2:27 PM
To: 'mrtg at list.ee.ethz.ch'
Subject: [mrtg] Extreme Black Diamond
I would like to get MRTG to use the "port names" from the Black
Diamond instead of 1:1, et cetera, when it displays them, this is what I
need from the black diamond:
1.3.6.1.2.1.31.1.1.1.18 - ifAlias
(...mgmt.mib-2.ifMIB.ifMIBObjects.ifXTable.ifXEntry.ifAlias)
I have a perl template that I found using snmpget which is:
my $instance=$if_ref;
#print "Instance = $instance\n";
my $output = `snmpget -c community $sysname
.1.3.6.1.2.1.31.1.1.1.18.$instance`;
#print "Output = $output\n";
my @thename = split /\=/,$output;
#print "The Name = @thename\n";
my $Alias = $thename[1];
print "Alias = $Alias\n\n";
if(not $problem_lines)
{
$target_lines .= <<ECHO;
Target[$target_name]: $if_ref:$router_connect
SetEnv[$target_name]: MRTG_INT_IP="$if_ip" MRTG_INT_DESCR="$if_snmp_descr"
ECHO ;
if ($directory_name) {
$target_lines .= "Directory[$target_name]: $directory_name\n";
}
$target_lines .= <<ECHO;
MaxBytes[$target_name]: $if_speed
Title[$target_name]: $router_name -- $sysname
PageTop[$target_name]: <H1>$html_desc_prefix $Alias -- $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 $if_port_name;
<TR><TD>Port Name:</TD> <TD>$if_port_name</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
;
} else {
$head_lines="";
$problem_lines="";
$target_lines="";
$separator_lines="";
}
This however does not appear to work
Does anyone have any suggestions for me?
Thanks,
-Drew
--
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