mirror of
https://github.com/munin-monitoring/contrib.git
synced 2025-07-26 02:48:28 +00:00
snmp__if_multi: fix properly ifAlias usage.
This commit is contained in:
parent
a4dbacada0
commit
3b62e60756
1 changed files with 5 additions and 3 deletions
|
@ -87,11 +87,12 @@ Should support indexing by
|
||||||
- ifIndex
|
- ifIndex
|
||||||
- ifName
|
- ifName
|
||||||
- ifDescr
|
- ifDescr
|
||||||
|
- ifAlias
|
||||||
- mac-address
|
- mac-address
|
||||||
|
|
||||||
(and anything else MRTG can index by) in addition to OID-index as now.
|
(and anything else MRTG can index by) in addition to OID-index as now.
|
||||||
|
|
||||||
Pulling in a user definable set of ifName/ifDescr for textual
|
Pulling in a user definable set of ifName/ifDescr/ifAlias for textual
|
||||||
description and even graph_title would also be nice.
|
description and even graph_title would also be nice.
|
||||||
|
|
||||||
IFF we get a patch to support the .oldname attribute then we may use
|
IFF we get a patch to support the .oldname attribute then we may use
|
||||||
|
@ -468,6 +469,7 @@ sub do_collect {
|
||||||
{ 6 => 'ifHCInOctets',
|
{ 6 => 'ifHCInOctets',
|
||||||
10 => 'ifHCOutOctets',
|
10 => 'ifHCOutOctets',
|
||||||
15 => 'ifHighSpeed',
|
15 => 'ifHighSpeed',
|
||||||
|
18 => 'ifAlias',
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -601,7 +603,7 @@ END
|
||||||
print "\n";
|
print "\n";
|
||||||
|
|
||||||
foreach my $if (sort {$a <=> $b} keys %{$snmpinfo}) {
|
foreach my $if (sort {$a <=> $b} keys %{$snmpinfo}) {
|
||||||
my $alias = $snmpinfo->{$if}->{ifDescr} || "Interface $if";
|
my $alias = $snmpinfoX->{$if}->{ifAlias} || $snmpinfo->{$if}->{ifDescr} || "Interface $if";
|
||||||
|
|
||||||
if (! ($alias =~ /\d+/) ) {
|
if (! ($alias =~ /\d+/) ) {
|
||||||
# If there are no numbers in the $alias add the if index
|
# If there are no numbers in the $alias add the if index
|
||||||
|
@ -620,7 +622,7 @@ END
|
||||||
sub do_config_if {
|
sub do_config_if {
|
||||||
my ($host,$version,$if) = @_;
|
my ($host,$version,$if) = @_;
|
||||||
|
|
||||||
my $alias = $snmpinfo->{$if}->{ifDescr} || "Interface $if";
|
my $alias = $snmpinfoX->{$if}->{ifAlias} || $snmpinfo->{$if}->{ifDescr} || "Interface $if";
|
||||||
|
|
||||||
if (! ($alias =~ /\d+/) ) {
|
if (! ($alias =~ /\d+/) ) {
|
||||||
# If there are no numbers in the $alias add the if index
|
# If there are no numbers in the $alias add the if index
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue